From 88ceeefe647c6777d3dcf9110cc5711c21525ef3 Mon Sep 17 00:00:00 2001
From: Rabab Ibrahim
Date: Tue, 28 Mar 2023 16:38:13 -0700
Subject: [PATCH 1/5] stg87 beta release prep (#34239)
---
sdk/storage/azure-storage-blob-batch/CHANGELOG.md | 8 +-------
sdk/storage/azure-storage-blob-batch/README.md | 2 +-
sdk/storage/azure-storage-blob-cryptography/CHANGELOG.md | 8 +-------
sdk/storage/azure-storage-blob-cryptography/README.md | 2 +-
sdk/storage/azure-storage-blob/CHANGELOG.md | 6 +-----
sdk/storage/azure-storage-blob/README.md | 2 +-
sdk/storage/azure-storage-common/CHANGELOG.md | 8 +-------
sdk/storage/azure-storage-common/README.md | 2 +-
sdk/storage/azure-storage-file-datalake/CHANGELOG.md | 8 +-------
sdk/storage/azure-storage-file-datalake/README.md | 2 +-
sdk/storage/azure-storage-file-share/CHANGELOG.md | 8 +-------
sdk/storage/azure-storage-file-share/README.md | 2 +-
sdk/storage/azure-storage-internal-avro/CHANGELOG.md | 8 +-------
sdk/storage/azure-storage-queue/CHANGELOG.md | 8 +-------
sdk/storage/azure-storage-queue/README.md | 2 +-
15 files changed, 15 insertions(+), 61 deletions(-)
diff --git a/sdk/storage/azure-storage-blob-batch/CHANGELOG.md b/sdk/storage/azure-storage-blob-batch/CHANGELOG.md
index 139d92b3ad4c9..d5974f8a94f5d 100644
--- a/sdk/storage/azure-storage-blob-batch/CHANGELOG.md
+++ b/sdk/storage/azure-storage-blob-batch/CHANGELOG.md
@@ -1,16 +1,10 @@
# Release History
-## 12.18.0-beta.1 (Unreleased)
+## 12.18.0-beta.1 (2023-03-28)
### Features Added
- Added support for 2022-11-02 service version.
-### Breaking Changes
-
-### Bugs Fixed
-
-### Other Changes
-
## 12.17.1 (2023-03-16)
### Other Changes
diff --git a/sdk/storage/azure-storage-blob-batch/README.md b/sdk/storage/azure-storage-blob-batch/README.md
index f64235e458ccc..0252a6f7a07c9 100644
--- a/sdk/storage/azure-storage-blob-batch/README.md
+++ b/sdk/storage/azure-storage-blob-batch/README.md
@@ -55,7 +55,7 @@ add the direct dependency to your project as follows.
com.azure
azure-storage-blob-batch
- 12.17.1
+ 12.18.0-beta.1
```
[//]: # ({x-version-update-end})
diff --git a/sdk/storage/azure-storage-blob-cryptography/CHANGELOG.md b/sdk/storage/azure-storage-blob-cryptography/CHANGELOG.md
index 658659cbdac86..7e3ca8b8c28e2 100644
--- a/sdk/storage/azure-storage-blob-cryptography/CHANGELOG.md
+++ b/sdk/storage/azure-storage-blob-cryptography/CHANGELOG.md
@@ -1,16 +1,10 @@
# Release History
-## 12.21.0-beta.1 (Unreleased)
+## 12.21.0-beta.1 (2023-03-28)
### Features Added
- Added support for 2022-11-02 service version.
-### Breaking Changes
-
-### Bugs Fixed
-
-### Other Changes
-
## 12.20.1 (2023-03-16)
### Other Changes
diff --git a/sdk/storage/azure-storage-blob-cryptography/README.md b/sdk/storage/azure-storage-blob-cryptography/README.md
index d409c5528b481..ae8f2bdcc96d3 100644
--- a/sdk/storage/azure-storage-blob-cryptography/README.md
+++ b/sdk/storage/azure-storage-blob-cryptography/README.md
@@ -57,7 +57,7 @@ add the direct dependency to your project as follows.
com.azure
azure-storage-blob-cryptography
- 12.20.1
+ 12.21.0-beta.1
```
[//]: # ({x-version-update-end})
diff --git a/sdk/storage/azure-storage-blob/CHANGELOG.md b/sdk/storage/azure-storage-blob/CHANGELOG.md
index 83d819614b93c..7d2ea262660ea 100644
--- a/sdk/storage/azure-storage-blob/CHANGELOG.md
+++ b/sdk/storage/azure-storage-blob/CHANGELOG.md
@@ -1,17 +1,13 @@
# Release History
-## 12.22.0-beta.1 (Unreleased)
+## 12.22.0-beta.1 (2023-03-28)
### Features Added
- Added support for 2022-11-02 service version.
-### Breaking Changes
-
### Bugs Fixed
- Fixed bug for when `FindBlobsOptions.setMaxResultsPerPage(Integer)` was set and `.byPage()` was called on `BlobServiceAsyncClient.findBlobsByTags(FindBlobsOptions)`, number of results being returned was greater than the specified max results.
-### Other Changes
-
## 12.21.1 (2023-03-16)
### Other Changes
diff --git a/sdk/storage/azure-storage-blob/README.md b/sdk/storage/azure-storage-blob/README.md
index 15fd6e56f7056..75480b85b5cdb 100644
--- a/sdk/storage/azure-storage-blob/README.md
+++ b/sdk/storage/azure-storage-blob/README.md
@@ -55,7 +55,7 @@ add the direct dependency to your project as follows.
com.azure
azure-storage-blob
- 12.21.1
+ 12.22.0-beta.1
```
[//]: # ({x-version-update-end})
diff --git a/sdk/storage/azure-storage-common/CHANGELOG.md b/sdk/storage/azure-storage-common/CHANGELOG.md
index 8cf3f6f0ce600..4265132158633 100644
--- a/sdk/storage/azure-storage-common/CHANGELOG.md
+++ b/sdk/storage/azure-storage-common/CHANGELOG.md
@@ -1,16 +1,10 @@
# Release History
-## 12.21.0-beta.1 (Unreleased)
+## 12.21.0-beta.1 (2023-03-28)
### Features Added
- Added support for 2022-11-02 service version.
-### Breaking Changes
-
-### Bugs Fixed
-
-### Other Changes
-
## 12.20.1 (2023-03-16)
### Other Changes
diff --git a/sdk/storage/azure-storage-common/README.md b/sdk/storage/azure-storage-common/README.md
index 8414d6324afbb..f69594540f98d 100644
--- a/sdk/storage/azure-storage-common/README.md
+++ b/sdk/storage/azure-storage-common/README.md
@@ -52,7 +52,7 @@ add the direct dependency to your project as follows.
com.azure
azure-storage-common
- 12.20.1
+ 12.21.0-beta.1
```
[//]: # ({x-version-update-end})
diff --git a/sdk/storage/azure-storage-file-datalake/CHANGELOG.md b/sdk/storage/azure-storage-file-datalake/CHANGELOG.md
index c81ceb2aadd99..323e2fc77571e 100644
--- a/sdk/storage/azure-storage-file-datalake/CHANGELOG.md
+++ b/sdk/storage/azure-storage-file-datalake/CHANGELOG.md
@@ -1,6 +1,6 @@
# Release History
-## 12.15.0-beta.1 (Unreleased)
+## 12.15.0-beta.1 (2023-03-28)
### Features Added
- Added support for 2022-11-02 service version.
@@ -8,12 +8,6 @@
file-level encryption keys. This value is returned on `DataLakeFileClient.getProperties()`, `DataLakeFileClient.readWithResponse()`,
and `DataLakeFileClient.listPaths()`.
-### Breaking Changes
-
-### Bugs Fixed
-
-### Other Changes
-
## 12.14.1 (2023-03-16)
### Other Changes
diff --git a/sdk/storage/azure-storage-file-datalake/README.md b/sdk/storage/azure-storage-file-datalake/README.md
index bb29ddcc9db4d..93beec7a862fa 100644
--- a/sdk/storage/azure-storage-file-datalake/README.md
+++ b/sdk/storage/azure-storage-file-datalake/README.md
@@ -56,7 +56,7 @@ add the direct dependency to your project as follows.
com.azure
azure-storage-file-datalake
- 12.14.1
+ 12.15.0-beta.1
```
[//]: # ({x-version-update-end})
diff --git a/sdk/storage/azure-storage-file-share/CHANGELOG.md b/sdk/storage/azure-storage-file-share/CHANGELOG.md
index 1d92e61707c7d..00b9d6cac1b6e 100644
--- a/sdk/storage/azure-storage-file-share/CHANGELOG.md
+++ b/sdk/storage/azure-storage-file-share/CHANGELOG.md
@@ -1,6 +1,6 @@
# Release History
-## 12.18.0-beta.1 (Unreleased)
+## 12.18.0-beta.1 (2023-03-28)
### Features Added
- Added support for 2022-11-02 service version.
@@ -11,12 +11,6 @@ only supported for certain operations in the Data Plane SDK.
provided, the service will not silently remove any trailing `.` character from directory/file names for all operations
made from that client. `allowSourceTrailingDot` will apply this same rule to source files when performing a rename or copy operation.
-### Breaking Changes
-
-### Bugs Fixed
-
-### Other Changes
-
## 12.17.1 (2023-03-16)
### Other Changes
diff --git a/sdk/storage/azure-storage-file-share/README.md b/sdk/storage/azure-storage-file-share/README.md
index 542f39c00e968..fabd9dedee56a 100644
--- a/sdk/storage/azure-storage-file-share/README.md
+++ b/sdk/storage/azure-storage-file-share/README.md
@@ -59,7 +59,7 @@ add the direct dependency to your project as follows.
com.azure
azure-storage-file-share
- 12.17.1
+ 12.18.0-beta.1
```
[//]: # ({x-version-update-end})
diff --git a/sdk/storage/azure-storage-internal-avro/CHANGELOG.md b/sdk/storage/azure-storage-internal-avro/CHANGELOG.md
index 7b14dc13a14c8..8b99443c9aabc 100644
--- a/sdk/storage/azure-storage-internal-avro/CHANGELOG.md
+++ b/sdk/storage/azure-storage-internal-avro/CHANGELOG.md
@@ -1,16 +1,10 @@
# Release History
-## 12.7.0-beta.1 (Unreleased)
+## 12.7.0-beta.1 (2023-03-28)
### Features Added
- Added support for 2022-11-02 service version.
-### Breaking Changes
-
-### Bugs Fixed
-
-### Other Changes
-
## 12.6.1 (2023-03-16)
### Other Changes
diff --git a/sdk/storage/azure-storage-queue/CHANGELOG.md b/sdk/storage/azure-storage-queue/CHANGELOG.md
index ad5a2f0c625d5..62c17cf41efca 100644
--- a/sdk/storage/azure-storage-queue/CHANGELOG.md
+++ b/sdk/storage/azure-storage-queue/CHANGELOG.md
@@ -1,16 +1,10 @@
# Release History
-## 12.17.0-beta.1 (Unreleased)
+## 12.17.0-beta.1 (2023-03-28)
### Features Added
- Added support for 2022-11-02 service version.
-### Breaking Changes
-
-### Bugs Fixed
-
-### Other Changes
-
## 12.16.1 (2023-03-16)
### Other Changes
diff --git a/sdk/storage/azure-storage-queue/README.md b/sdk/storage/azure-storage-queue/README.md
index cc86bcab8e2be..5c46048e4c5d2 100644
--- a/sdk/storage/azure-storage-queue/README.md
+++ b/sdk/storage/azure-storage-queue/README.md
@@ -53,7 +53,7 @@ add the direct dependency to your project as follows.
com.azure
azure-storage-queue
- 12.16.1
+ 12.17.0-beta.1
```
[//]: # ({x-version-update-end})
From 3178009df783056f86cbd723397efc93021c8655 Mon Sep 17 00:00:00 2001
From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Date: Tue, 28 Mar 2023 17:45:34 -0700
Subject: [PATCH 2/5] Increment versions for storage releases (#34242)
Increment package versions for storage releases
---
eng/jacoco-test-coverage/pom.xml | 16 ++++++++--------
eng/versioning/version_client.txt | 16 ++++++++--------
.../azure-storage-blob-batch/CHANGELOG.md | 10 ++++++++++
sdk/storage/azure-storage-blob-batch/pom.xml | 6 +++---
.../azure-storage-blob-changefeed/pom.xml | 4 ++--
.../azure-storage-blob-cryptography/CHANGELOG.md | 10 ++++++++++
.../azure-storage-blob-cryptography/pom.xml | 6 +++---
sdk/storage/azure-storage-blob-nio/pom.xml | 4 ++--
sdk/storage/azure-storage-blob/CHANGELOG.md | 10 ++++++++++
sdk/storage/azure-storage-blob/pom.xml | 8 ++++----
sdk/storage/azure-storage-common/CHANGELOG.md | 10 ++++++++++
sdk/storage/azure-storage-common/pom.xml | 2 +-
.../azure-storage-file-datalake/CHANGELOG.md | 10 ++++++++++
sdk/storage/azure-storage-file-datalake/pom.xml | 6 +++---
.../azure-storage-file-share/CHANGELOG.md | 10 ++++++++++
sdk/storage/azure-storage-file-share/pom.xml | 8 ++++----
.../azure-storage-internal-avro/CHANGELOG.md | 10 ++++++++++
sdk/storage/azure-storage-internal-avro/pom.xml | 6 +++---
sdk/storage/azure-storage-perf/pom.xml | 8 ++++----
sdk/storage/azure-storage-queue/CHANGELOG.md | 10 ++++++++++
sdk/storage/azure-storage-queue/pom.xml | 6 +++---
21 files changed, 128 insertions(+), 48 deletions(-)
diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml
index ffe480a2c381f..f81fe39162c00 100644
--- a/eng/jacoco-test-coverage/pom.xml
+++ b/eng/jacoco-test-coverage/pom.xml
@@ -318,17 +318,17 @@
com.azure
azure-storage-common
- 12.21.0-beta.1
+ 12.21.0-beta.2
com.azure
azure-storage-blob
- 12.22.0-beta.1
+ 12.22.0-beta.2
com.azure
azure-storage-blob-batch
- 12.18.0-beta.1
+ 12.18.0-beta.2
com.azure
@@ -338,7 +338,7 @@
com.azure
azure-storage-blob-cryptography
- 12.21.0-beta.1
+ 12.21.0-beta.2
com.azure
@@ -348,22 +348,22 @@
com.azure
azure-storage-file-share
- 12.18.0-beta.1
+ 12.18.0-beta.2
com.azure
azure-storage-file-datalake
- 12.15.0-beta.1
+ 12.15.0-beta.2
com.azure
azure-storage-internal-avro
- 12.7.0-beta.1
+ 12.7.0-beta.2
com.azure
azure-storage-queue
- 12.17.0-beta.1
+ 12.17.0-beta.2
com.azure
diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index ccfbdfc94a7ea..7ce31cafa3527 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -161,17 +161,17 @@ com.azure:azure-sdk-template-two;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-sdk-template-three;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-spring-data-cosmos;3.33.0;3.34.0-beta.1
com.azure:azure-spring-data-cosmos-test;3.0.0-beta.1;3.0.0-beta.1
-com.azure:azure-storage-blob;12.21.1;12.22.0-beta.1
-com.azure:azure-storage-blob-batch;12.17.1;12.18.0-beta.1
+com.azure:azure-storage-blob;12.21.1;12.22.0-beta.2
+com.azure:azure-storage-blob-batch;12.17.1;12.18.0-beta.2
com.azure:azure-storage-blob-changefeed;12.0.0-beta.18;12.0.0-beta.19
-com.azure:azure-storage-blob-cryptography;12.20.1;12.21.0-beta.1
+com.azure:azure-storage-blob-cryptography;12.20.1;12.21.0-beta.2
com.azure:azure-storage-blob-nio;12.0.0-beta.19;12.0.0-beta.20
-com.azure:azure-storage-common;12.20.1;12.21.0-beta.1
-com.azure:azure-storage-file-share;12.17.1;12.18.0-beta.1
-com.azure:azure-storage-file-datalake;12.14.1;12.15.0-beta.1
-com.azure:azure-storage-internal-avro;12.6.1;12.7.0-beta.1
+com.azure:azure-storage-common;12.20.1;12.21.0-beta.2
+com.azure:azure-storage-file-share;12.17.1;12.18.0-beta.2
+com.azure:azure-storage-file-datalake;12.14.1;12.15.0-beta.2
+com.azure:azure-storage-internal-avro;12.6.1;12.7.0-beta.2
com.azure:azure-storage-perf;1.0.0-beta.1;1.0.0-beta.1
-com.azure:azure-storage-queue;12.16.1;12.17.0-beta.1
+com.azure:azure-storage-queue;12.16.1;12.17.0-beta.2
com.azure:azure-template-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-media-videoanalyzer-edge;1.0.0-beta.6;1.0.0-beta.7
com.azure:azure-verticals-agrifood-farming;1.0.0-beta.3;1.0.0-beta.4
diff --git a/sdk/storage/azure-storage-blob-batch/CHANGELOG.md b/sdk/storage/azure-storage-blob-batch/CHANGELOG.md
index d5974f8a94f5d..a0b0642c95922 100644
--- a/sdk/storage/azure-storage-blob-batch/CHANGELOG.md
+++ b/sdk/storage/azure-storage-blob-batch/CHANGELOG.md
@@ -1,5 +1,15 @@
# Release History
+## 12.18.0-beta.2 (Unreleased)
+
+### Features Added
+
+### Breaking Changes
+
+### Bugs Fixed
+
+### Other Changes
+
## 12.18.0-beta.1 (2023-03-28)
### Features Added
diff --git a/sdk/storage/azure-storage-blob-batch/pom.xml b/sdk/storage/azure-storage-blob-batch/pom.xml
index fd79b5aa47b91..094319b1355fd 100644
--- a/sdk/storage/azure-storage-blob-batch/pom.xml
+++ b/sdk/storage/azure-storage-blob-batch/pom.xml
@@ -13,7 +13,7 @@
com.azure
azure-storage-blob-batch
- 12.18.0-beta.1
+ 12.18.0-beta.2
Microsoft Azure client library for Blob Storage batching
This module contains client library for Microsoft Azure Blob Storage batching.
@@ -78,7 +78,7 @@
com.azure
azure-storage-blob
- 12.22.0-beta.1
+ 12.22.0-beta.2
@@ -100,7 +100,7 @@
com.azure
azure-storage-common
- 12.21.0-beta.1
+ 12.21.0-beta.2
tests
test-jar
test
diff --git a/sdk/storage/azure-storage-blob-changefeed/pom.xml b/sdk/storage/azure-storage-blob-changefeed/pom.xml
index e64dc30d3cd25..df114485213aa 100644
--- a/sdk/storage/azure-storage-blob-changefeed/pom.xml
+++ b/sdk/storage/azure-storage-blob-changefeed/pom.xml
@@ -84,7 +84,7 @@
com.azure
azure-storage-blob
- 12.22.0-beta.1
+ 12.22.0-beta.2
@@ -106,7 +106,7 @@
com.azure
azure-storage-common
- 12.21.0-beta.1
+ 12.21.0-beta.2
tests
test-jar
test
diff --git a/sdk/storage/azure-storage-blob-cryptography/CHANGELOG.md b/sdk/storage/azure-storage-blob-cryptography/CHANGELOG.md
index 7e3ca8b8c28e2..2797a48f43419 100644
--- a/sdk/storage/azure-storage-blob-cryptography/CHANGELOG.md
+++ b/sdk/storage/azure-storage-blob-cryptography/CHANGELOG.md
@@ -1,5 +1,15 @@
# Release History
+## 12.21.0-beta.2 (Unreleased)
+
+### Features Added
+
+### Breaking Changes
+
+### Bugs Fixed
+
+### Other Changes
+
## 12.21.0-beta.1 (2023-03-28)
### Features Added
diff --git a/sdk/storage/azure-storage-blob-cryptography/pom.xml b/sdk/storage/azure-storage-blob-cryptography/pom.xml
index e0900b467c359..46ab9e2b34d88 100644
--- a/sdk/storage/azure-storage-blob-cryptography/pom.xml
+++ b/sdk/storage/azure-storage-blob-cryptography/pom.xml
@@ -13,7 +13,7 @@
com.azure
azure-storage-blob-cryptography
- 12.21.0-beta.1
+ 12.21.0-beta.2
Microsoft Azure client library for Blob Storage cryptography
This module contains client library for Microsoft Azure Blob Storage cryptography.
@@ -62,7 +62,7 @@
com.azure
azure-storage-blob
- 12.22.0-beta.1
+ 12.22.0-beta.2
@@ -74,7 +74,7 @@
com.azure
azure-storage-common
- 12.21.0-beta.1
+ 12.21.0-beta.2
tests
test-jar
test
diff --git a/sdk/storage/azure-storage-blob-nio/pom.xml b/sdk/storage/azure-storage-blob-nio/pom.xml
index 0bccf7ff126d1..e728a0cff188e 100644
--- a/sdk/storage/azure-storage-blob-nio/pom.xml
+++ b/sdk/storage/azure-storage-blob-nio/pom.xml
@@ -77,7 +77,7 @@
com.azure
azure-storage-blob
- 12.22.0-beta.1
+ 12.22.0-beta.2
@@ -89,7 +89,7 @@
com.azure
azure-storage-common
- 12.21.0-beta.1
+ 12.21.0-beta.2
tests
test-jar
test
diff --git a/sdk/storage/azure-storage-blob/CHANGELOG.md b/sdk/storage/azure-storage-blob/CHANGELOG.md
index 7d2ea262660ea..ae1ba3918d038 100644
--- a/sdk/storage/azure-storage-blob/CHANGELOG.md
+++ b/sdk/storage/azure-storage-blob/CHANGELOG.md
@@ -1,5 +1,15 @@
# Release History
+## 12.22.0-beta.2 (Unreleased)
+
+### Features Added
+
+### Breaking Changes
+
+### Bugs Fixed
+
+### Other Changes
+
## 12.22.0-beta.1 (2023-03-28)
### Features Added
diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml
index 8a17129bef8c0..8df0847b691cd 100644
--- a/sdk/storage/azure-storage-blob/pom.xml
+++ b/sdk/storage/azure-storage-blob/pom.xml
@@ -13,7 +13,7 @@
com.azure
azure-storage-blob
- 12.22.0-beta.1
+ 12.22.0-beta.2
Microsoft Azure client library for Blob Storage
This module contains client library for Microsoft Azure Blob Storage.
@@ -86,12 +86,12 @@
com.azure
azure-storage-common
- 12.21.0-beta.1
+ 12.21.0-beta.2
com.azure
azure-storage-internal-avro
- 12.7.0-beta.1
+ 12.7.0-beta.2
@@ -112,7 +112,7 @@
com.azure
azure-storage-common
- 12.21.0-beta.1
+ 12.21.0-beta.2
tests
test-jar
test
diff --git a/sdk/storage/azure-storage-common/CHANGELOG.md b/sdk/storage/azure-storage-common/CHANGELOG.md
index 4265132158633..b0f28d0251171 100644
--- a/sdk/storage/azure-storage-common/CHANGELOG.md
+++ b/sdk/storage/azure-storage-common/CHANGELOG.md
@@ -1,5 +1,15 @@
# Release History
+## 12.21.0-beta.2 (Unreleased)
+
+### Features Added
+
+### Breaking Changes
+
+### Bugs Fixed
+
+### Other Changes
+
## 12.21.0-beta.1 (2023-03-28)
### Features Added
diff --git a/sdk/storage/azure-storage-common/pom.xml b/sdk/storage/azure-storage-common/pom.xml
index cc6b82aac6a03..067e33ab55ee5 100644
--- a/sdk/storage/azure-storage-common/pom.xml
+++ b/sdk/storage/azure-storage-common/pom.xml
@@ -13,7 +13,7 @@
com.azure
azure-storage-common
- 12.21.0-beta.1
+ 12.21.0-beta.2
Microsoft Azure common module for Storage
This module contains common code based for all Microsoft Azure Storage client libraries.
diff --git a/sdk/storage/azure-storage-file-datalake/CHANGELOG.md b/sdk/storage/azure-storage-file-datalake/CHANGELOG.md
index 323e2fc77571e..d1736c0503bb5 100644
--- a/sdk/storage/azure-storage-file-datalake/CHANGELOG.md
+++ b/sdk/storage/azure-storage-file-datalake/CHANGELOG.md
@@ -1,5 +1,15 @@
# Release History
+## 12.15.0-beta.2 (Unreleased)
+
+### Features Added
+
+### Breaking Changes
+
+### Bugs Fixed
+
+### Other Changes
+
## 12.15.0-beta.1 (2023-03-28)
### Features Added
diff --git a/sdk/storage/azure-storage-file-datalake/pom.xml b/sdk/storage/azure-storage-file-datalake/pom.xml
index df20e5cff784a..5ac0c806c95ee 100644
--- a/sdk/storage/azure-storage-file-datalake/pom.xml
+++ b/sdk/storage/azure-storage-file-datalake/pom.xml
@@ -13,7 +13,7 @@
com.azure
azure-storage-file-datalake
- 12.15.0-beta.1
+ 12.15.0-beta.2
Microsoft Azure client library for File Storage Data Lake
This module contains client library for Microsoft Azure File Storage Data Lake.
@@ -84,7 +84,7 @@
com.azure
azure-storage-blob
- 12.22.0-beta.1
+ 12.22.0-beta.2
@@ -106,7 +106,7 @@
com.azure
azure-storage-common
- 12.21.0-beta.1
+ 12.21.0-beta.2
tests
test-jar
test
diff --git a/sdk/storage/azure-storage-file-share/CHANGELOG.md b/sdk/storage/azure-storage-file-share/CHANGELOG.md
index 00b9d6cac1b6e..273f25aaa0c13 100644
--- a/sdk/storage/azure-storage-file-share/CHANGELOG.md
+++ b/sdk/storage/azure-storage-file-share/CHANGELOG.md
@@ -1,5 +1,15 @@
# Release History
+## 12.18.0-beta.2 (Unreleased)
+
+### Features Added
+
+### Breaking Changes
+
+### Bugs Fixed
+
+### Other Changes
+
## 12.18.0-beta.1 (2023-03-28)
### Features Added
diff --git a/sdk/storage/azure-storage-file-share/pom.xml b/sdk/storage/azure-storage-file-share/pom.xml
index af2822da06131..02dc54ff6471c 100644
--- a/sdk/storage/azure-storage-file-share/pom.xml
+++ b/sdk/storage/azure-storage-file-share/pom.xml
@@ -13,7 +13,7 @@
com.azure
azure-storage-file-share
- 12.18.0-beta.1
+ 12.18.0-beta.2
Microsoft Azure client library for File Share Storage
This module contains client library for Microsoft Azure File Share Storage.
@@ -64,7 +64,7 @@
com.azure
azure-storage-common
- 12.21.0-beta.1
+ 12.21.0-beta.2
@@ -76,7 +76,7 @@
com.azure
azure-storage-common
- 12.21.0-beta.1
+ 12.21.0-beta.2
tests
test-jar
test
@@ -113,7 +113,7 @@
com.azure
azure-storage-blob
- 12.22.0-beta.1
+ 12.22.0-beta.2
test
diff --git a/sdk/storage/azure-storage-internal-avro/CHANGELOG.md b/sdk/storage/azure-storage-internal-avro/CHANGELOG.md
index 8b99443c9aabc..1b84fc02a9723 100644
--- a/sdk/storage/azure-storage-internal-avro/CHANGELOG.md
+++ b/sdk/storage/azure-storage-internal-avro/CHANGELOG.md
@@ -1,5 +1,15 @@
# Release History
+## 12.7.0-beta.2 (Unreleased)
+
+### Features Added
+
+### Breaking Changes
+
+### Bugs Fixed
+
+### Other Changes
+
## 12.7.0-beta.1 (2023-03-28)
### Features Added
diff --git a/sdk/storage/azure-storage-internal-avro/pom.xml b/sdk/storage/azure-storage-internal-avro/pom.xml
index f32dd462b98a0..11d645fadd9ad 100644
--- a/sdk/storage/azure-storage-internal-avro/pom.xml
+++ b/sdk/storage/azure-storage-internal-avro/pom.xml
@@ -13,7 +13,7 @@
com.azure
azure-storage-internal-avro
- 12.7.0-beta.1
+ 12.7.0-beta.2
Microsoft Azure internal Avro module for Storage
This module contains internal use only avro parser code based for Microsoft Azure Storage client libraries.
@@ -57,7 +57,7 @@
com.azure
azure-storage-common
- 12.21.0-beta.1
+ 12.21.0-beta.2
@@ -75,7 +75,7 @@
com.azure
azure-storage-common
- 12.21.0-beta.1
+ 12.21.0-beta.2
tests
test-jar
test
diff --git a/sdk/storage/azure-storage-perf/pom.xml b/sdk/storage/azure-storage-perf/pom.xml
index 90457325b44d2..ea43cbf940d2c 100644
--- a/sdk/storage/azure-storage-perf/pom.xml
+++ b/sdk/storage/azure-storage-perf/pom.xml
@@ -25,25 +25,25 @@
com.azure
azure-storage-blob
- 12.22.0-beta.1
+ 12.22.0-beta.2
com.azure
azure-storage-blob-cryptography
- 12.21.0-beta.1
+ 12.21.0-beta.2
com.azure
azure-storage-file-datalake
- 12.15.0-beta.1
+ 12.15.0-beta.2
com.azure
azure-storage-file-share
- 12.18.0-beta.1
+ 12.18.0-beta.2
diff --git a/sdk/storage/azure-storage-queue/CHANGELOG.md b/sdk/storage/azure-storage-queue/CHANGELOG.md
index 62c17cf41efca..9d41ce46d7cfc 100644
--- a/sdk/storage/azure-storage-queue/CHANGELOG.md
+++ b/sdk/storage/azure-storage-queue/CHANGELOG.md
@@ -1,5 +1,15 @@
# Release History
+## 12.17.0-beta.2 (Unreleased)
+
+### Features Added
+
+### Breaking Changes
+
+### Bugs Fixed
+
+### Other Changes
+
## 12.17.0-beta.1 (2023-03-28)
### Features Added
diff --git a/sdk/storage/azure-storage-queue/pom.xml b/sdk/storage/azure-storage-queue/pom.xml
index acd82f423324f..2fe4909ecaabf 100644
--- a/sdk/storage/azure-storage-queue/pom.xml
+++ b/sdk/storage/azure-storage-queue/pom.xml
@@ -13,7 +13,7 @@
com.azure
azure-storage-queue
- 12.17.0-beta.1
+ 12.17.0-beta.2
Microsoft Azure client library for Queue Storage
This module contains client library for Microsoft Azure Queue Storage.
@@ -62,7 +62,7 @@
com.azure
azure-storage-common
- 12.21.0-beta.1
+ 12.21.0-beta.2
@@ -74,7 +74,7 @@
com.azure
azure-storage-common
- 12.21.0-beta.1
+ 12.21.0-beta.2
tests
test-jar
test
From b343b91c2397fef307bf51409b34f9729f82a775 Mon Sep 17 00:00:00 2001
From: Liudmila Molkova
Date: Tue, 28 Mar 2023 18:12:01 -0700
Subject: [PATCH 3/5] ACR arch board feedback (#34070)
* Address arch board feedback
* Rename client and methods
* update manifest media types and autorest
* remove /oauth2/token and regenerate
* config -> configuration
* Remove response from downloadStreamWithResponse
* align swagger
---
.../checkstyle/checkstyle-suppressions.xml | 2 +-
.../perf/DownloadBlobTests.java | 5 +-
.../perf/core/ServiceTest.java | 14 +-
.../CHANGELOG.md | 24 +-
.../README.md | 36 +-
... ContainerRegistryContentAsyncClient.java} | 174 +++---
...va => ContainerRegistryContentClient.java} | 163 +++---
...ontainerRegistryContentClientBuilder.java} | 105 ++--
.../implementation/AuthenticationsImpl.java | 130 -----
.../implementation/ConstructorAccessors.java | 83 +--
.../implementation/UtilsImpl.java | 30 +-
.../models/DownloadBlobAsyncResult.java | 76 ---
.../models/DownloadManifestResult.java | 73 ---
.../models/GetManifestResult.java | 49 ++
.../models/ManifestMediaType.java | 2 +-
.../models/OciAnnotations.java | 22 +-
.../models/OciImageManifest.java | 26 +-
...stOptions.java => SetManifestOptions.java} | 32 +-
...festResult.java => SetManifestResult.java} | 14 +-
...ult.java => UploadRegistryBlobResult.java} | 6 +-
.../specialized/package-info.java | 9 -
.../src/main/java/module-info.java | 1 -
.../containerregistry/DownloadImage.java | 83 +--
.../containerregistry/DownloadImageAsync.java | 97 ++--
.../containerregistry/ReadmeSamples.java | 53 +-
.../containerregistry/UploadImage.java | 60 +-
.../containerregistry/UploadImageAsync.java | 52 +-
.../ContainerRegistryClientsTestBase.java | 19 +-
...egistryContentClientIntegrationTests.java} | 283 ++++-----
... ContainerRegistryContentClientTests.java} | 185 +++---
.../containerregistry/TestUtils.java | 3 +-
...canDownloadManifestWithListOfTypes[1].json | 453 ---------------
...wnloadManifestWithListOfTypesAsync[1].json | 549 ------------------
...tIntegerationTests.uploadManifest[1].json} | 0
...entIntegrationTests.canUploadBlob[1].json} | 0
...nUploadDockerManifestWithTagAsync[1].json} | 0
...ts.canUploadDockerManifestWithTag[1].json} | 0
...ts.canUploadHugeBlobInChunksAsync[1].json} | 0
...onTests.canUploadHugeBlobInChunks[1].json} | 0
...onTests.canUploadOciManifestAsync[1].json} | 0
...ts.canUploadOciManifestBinaryData[1].json} | 0
...ts.canUploadOciManifestViaOptions[1].json} | 0
...Tests.canUploadOciManifestWithTag[1].json} | 0
...grationTests.canUploadOciManifest[1].json} | 0
...ntegrationTests.downloadBlobAsync[1].json} | 0
...ientIntegrationTests.downloadBlob[1].json} | 0
...ationTests.downloadSmallBlobAsync[1].json} | 0
...ntegrationTests.downloadSmallBlob[1].json} | 0
...IntegrationTests.getManifestAsync[1].json} | 0
...ionTests.getManifestDifferentType[1].json} | 112 ++--
...Tests.getManifestIncompatibleType[1].json} | 162 ++++--
...ests.getManifestListManifestAsync[1].json} | 0
...tionTests.getManifestListManifest[1].json} | 0
...lientIntegrationTests.getManifest[1].json} | 0
...lientIntegrationTests.setManifest[1].json} | 0
.../swagger/autorest.md | 55 +-
56 files changed, 966 insertions(+), 2276 deletions(-)
rename sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/{specialized/ContainerRegistryBlobAsyncClient.java => ContainerRegistryContentAsyncClient.java} (76%)
rename sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/{specialized/ContainerRegistryBlobClient.java => ContainerRegistryContentClient.java} (74%)
rename sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/{specialized/ContainerRegistryBlobClientBuilder.java => ContainerRegistryContentClientBuilder.java} (78%)
delete mode 100644 sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/DownloadBlobAsyncResult.java
delete mode 100644 sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/DownloadManifestResult.java
create mode 100644 sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/GetManifestResult.java
rename sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/{UploadManifestOptions.java => SetManifestOptions.java} (57%)
rename sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/{UploadManifestResult.java => SetManifestResult.java} (51%)
rename sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/{UploadBlobResult.java => UploadRegistryBlobResult.java} (81%)
delete mode 100644 sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/specialized/package-info.java
rename sdk/containerregistry/azure-containers-containerregistry/src/test/java/com/azure/containers/containerregistry/{ContainerRegistryBlobClientIntegrationTests.java => ContainerRegistryContentClientIntegrationTests.java} (61%)
rename sdk/containerregistry/azure-containers-containerregistry/src/test/java/com/azure/containers/containerregistry/{ContainerRegistryBlobClientTests.java => ContainerRegistryContentClientTests.java} (66%)
delete mode 100644 sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.canDownloadManifestWithListOfTypes[1].json
delete mode 100644 sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.downloadManifestWithListOfTypesAsync[1].json
rename sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/{ContainerRegistryBlobClientIntegerationTests.uploadManifest[1].json => ContainerRegistryContentClientIntegerationTests.uploadManifest[1].json} (100%)
rename sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/{ContainerRegistryBlobClientIntegrationTests.canUploadBlob[1].json => ContainerRegistryContentClientIntegrationTests.canUploadBlob[1].json} (100%)
rename sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/{ContainerRegistryBlobClientIntegrationTests.canUploadDockerManifestWithTagAsync[1].json => ContainerRegistryContentClientIntegrationTests.canUploadDockerManifestWithTagAsync[1].json} (100%)
rename sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/{ContainerRegistryBlobClientIntegrationTests.canUploadDockerManifestWithTag[1].json => ContainerRegistryContentClientIntegrationTests.canUploadDockerManifestWithTag[1].json} (100%)
rename sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/{ContainerRegistryBlobClientIntegrationTests.canUploadHugeBlobInChunksAsync[1].json => ContainerRegistryContentClientIntegrationTests.canUploadHugeBlobInChunksAsync[1].json} (100%)
rename sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/{ContainerRegistryBlobClientIntegrationTests.canUploadHugeBlobInChunks[1].json => ContainerRegistryContentClientIntegrationTests.canUploadHugeBlobInChunks[1].json} (100%)
rename sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/{ContainerRegistryBlobClientIntegrationTests.canUploadOciManifestAsync[1].json => ContainerRegistryContentClientIntegrationTests.canUploadOciManifestAsync[1].json} (100%)
rename sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/{ContainerRegistryBlobClientIntegrationTests.canUploadOciManifestBinaryData[1].json => ContainerRegistryContentClientIntegrationTests.canUploadOciManifestBinaryData[1].json} (100%)
rename sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/{ContainerRegistryBlobClientIntegrationTests.canUploadOciManifestViaOptions[1].json => ContainerRegistryContentClientIntegrationTests.canUploadOciManifestViaOptions[1].json} (100%)
rename sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/{ContainerRegistryBlobClientIntegrationTests.canUploadOciManifestWithTag[1].json => ContainerRegistryContentClientIntegrationTests.canUploadOciManifestWithTag[1].json} (100%)
rename sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/{ContainerRegistryBlobClientIntegrationTests.canUploadOciManifest[1].json => ContainerRegistryContentClientIntegrationTests.canUploadOciManifest[1].json} (100%)
rename sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/{ContainerRegistryBlobClientIntegrationTests.downloadBlobAsync[1].json => ContainerRegistryContentClientIntegrationTests.downloadBlobAsync[1].json} (100%)
rename sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/{ContainerRegistryBlobClientIntegrationTests.downloadBlob[1].json => ContainerRegistryContentClientIntegrationTests.downloadBlob[1].json} (100%)
rename sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/{ContainerRegistryBlobClientIntegrationTests.downloadSmallBlobAsync[1].json => ContainerRegistryContentClientIntegrationTests.downloadSmallBlobAsync[1].json} (100%)
rename sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/{ContainerRegistryBlobClientIntegrationTests.downloadSmallBlob[1].json => ContainerRegistryContentClientIntegrationTests.downloadSmallBlob[1].json} (100%)
rename sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/{ContainerRegistryBlobClientIntegrationTests.downloadManifestAsync[1].json => ContainerRegistryContentClientIntegrationTests.getManifestAsync[1].json} (100%)
rename sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/{ContainerRegistryBlobClientIntegrationTests.downloadManifestIncompatibleType[1].json => ContainerRegistryContentClientIntegrationTests.getManifestDifferentType[1].json} (52%)
rename sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/{ContainerRegistryBlobClientIntegrationTests.downloadManifestDifferentType[1].json => ContainerRegistryContentClientIntegrationTests.getManifestIncompatibleType[1].json} (54%)
rename sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/{ContainerRegistryBlobClientIntegrationTests.downloadManifestListManifestAsync[1].json => ContainerRegistryContentClientIntegrationTests.getManifestListManifestAsync[1].json} (100%)
rename sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/{ContainerRegistryBlobClientIntegrationTests.downloadManifestListManifest[1].json => ContainerRegistryContentClientIntegrationTests.getManifestListManifest[1].json} (100%)
rename sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/{ContainerRegistryBlobClientIntegrationTests.downloadManifest[1].json => ContainerRegistryContentClientIntegrationTests.getManifest[1].json} (100%)
rename sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/{ContainerRegistryBlobClientIntegrationTests.uploadManifest[1].json => ContainerRegistryContentClientIntegrationTests.setManifest[1].json} (100%)
diff --git a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml
index 81c91fc0d5b91..c012ed292c27d 100755
--- a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml
+++ b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml
@@ -193,7 +193,7 @@ the main ServiceBusClientBuilder. -->
+ files="com.azure.containers.containerregistry.ContainerRegistryContentClient.java"/>
diff --git a/sdk/containerregistry/azure-containers-containerregistry-perf/src/main/java/com/azure/containers/containerregistry/perf/DownloadBlobTests.java b/sdk/containerregistry/azure-containers-containerregistry-perf/src/main/java/com/azure/containers/containerregistry/perf/DownloadBlobTests.java
index 469be0403916d..8dd17988faae8 100644
--- a/sdk/containerregistry/azure-containers-containerregistry-perf/src/main/java/com/azure/containers/containerregistry/perf/DownloadBlobTests.java
+++ b/sdk/containerregistry/azure-containers-containerregistry-perf/src/main/java/com/azure/containers/containerregistry/perf/DownloadBlobTests.java
@@ -5,6 +5,7 @@
import com.azure.containers.containerregistry.perf.core.ServiceTest;
import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
import com.azure.perf.test.core.NullOutputStream;
import com.azure.perf.test.core.PerfStressOptions;
import reactor.core.publisher.Mono;
@@ -36,13 +37,13 @@ public Mono setupAsync() {
@Override
public void run() {
- blobClient.downloadStream(digest[0], Channels.newChannel(output), Context.NONE);
+ blobClient.downloadStream(digest[0], Channels.newChannel(output));
}
@Override
public Mono runAsync() {
return blobAsyncClient.downloadStream(digest[0])
- .flatMap(result -> result.writeValueTo(Channels.newChannel(output)))
+ .flatMap(result -> FluxUtil.writeToOutputStream(result.toFluxByteBuffer(), output))
.then();
}
}
diff --git a/sdk/containerregistry/azure-containers-containerregistry-perf/src/main/java/com/azure/containers/containerregistry/perf/core/ServiceTest.java b/sdk/containerregistry/azure-containers-containerregistry-perf/src/main/java/com/azure/containers/containerregistry/perf/core/ServiceTest.java
index 0a173d6778bb1..976d67210550e 100644
--- a/sdk/containerregistry/azure-containers-containerregistry-perf/src/main/java/com/azure/containers/containerregistry/perf/core/ServiceTest.java
+++ b/sdk/containerregistry/azure-containers-containerregistry-perf/src/main/java/com/azure/containers/containerregistry/perf/core/ServiceTest.java
@@ -6,9 +6,9 @@
import com.azure.containers.containerregistry.ContainerRegistryAsyncClient;
import com.azure.containers.containerregistry.ContainerRegistryClient;
import com.azure.containers.containerregistry.ContainerRegistryClientBuilder;
-import com.azure.containers.containerregistry.specialized.ContainerRegistryBlobAsyncClient;
-import com.azure.containers.containerregistry.specialized.ContainerRegistryBlobClient;
-import com.azure.containers.containerregistry.specialized.ContainerRegistryBlobClientBuilder;
+import com.azure.containers.containerregistry.ContainerRegistryContentAsyncClient;
+import com.azure.containers.containerregistry.ContainerRegistryContentClient;
+import com.azure.containers.containerregistry.ContainerRegistryContentClientBuilder;
import com.azure.core.credential.TokenCredential;
import com.azure.core.http.netty.NettyAsyncHttpClientProvider;
import com.azure.core.http.okhttp.OkHttpAsyncClientProvider;
@@ -60,8 +60,8 @@ public abstract class ServiceTest extends Pe
*/
protected ContainerRegistryAsyncClient containerRegistryAsyncClient;
- protected ContainerRegistryBlobClient blobClient;
- protected ContainerRegistryBlobAsyncClient blobAsyncClient;
+ protected ContainerRegistryContentClient blobClient;
+ protected ContainerRegistryContentAsyncClient blobAsyncClient;
/**
* The base class for Azure Container Registry performance tests.
@@ -91,11 +91,11 @@ public ServiceTest(TOptions options) {
this.containerRegistryClient = builder.buildClient();
this.containerRegistryAsyncClient = builder.buildAsyncClient();
- ContainerRegistryBlobClientBuilder blobClientBuilder = new ContainerRegistryBlobClientBuilder()
+ ContainerRegistryContentClientBuilder blobClientBuilder = new ContainerRegistryContentClientBuilder()
.credential(tokenCredential)
.clientOptions(httpOptions)
.endpoint(registryEndpoint)
- .repository("oci-artifact");
+ .repositoryName("oci-artifact");
this.blobClient = blobClientBuilder.buildClient();
this.blobAsyncClient = blobClientBuilder.buildAsyncClient();
diff --git a/sdk/containerregistry/azure-containers-containerregistry/CHANGELOG.md b/sdk/containerregistry/azure-containers-containerregistry/CHANGELOG.md
index 8be1a6d4c47a2..dd7680baf7339 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/CHANGELOG.md
+++ b/sdk/containerregistry/azure-containers-containerregistry/CHANGELOG.md
@@ -4,10 +4,22 @@
### Features Added
-### Breaking Changes
-
-- Replaced `uploadManifest(OciImageManifest)` method on `ContainerRegistryBlobClient` and `ContainerRegistryBlobAsyncClient` classes
- with `uploadManifest(OciImageManifest manifest, String tag)` method.
+### Breaking Changes from version 1.1.0-beta.3
+
+- `ContainerRegistryBlobClientBuilder`, `ContainerRegistryBlobClient` and `ContainerRegistryBlobAsyncClient` were renamed to `ContainerRegistryContentClientBuilder`,
+ `ContainerRegistryContentClient`, and `ContainerRegistryContentAsyncClient` and moved to `com.azure.containers.containerregistry` package.
+- `UploadBlobResult` was renamed to `UploadRegistryBlobResult`
+- `ContainerRegistryContentClient` and `ContainerRegistryContentAsyncClient` changes:
+ - `uploadManifest` method was renamed to `setManifest`, `uploadManifestWithResponse` renamed to `setManifestWithResponse`, the return type of these methods was renamed to `SetManifestResult`.
+ `UploadManifestOptions` renamed to `SetManifestOptions`.
+ - `downloadManifest` method was renamed to `getManifest`, `downloadManifestWithResponse` renamed to `getManifestWithResponse`, the return type of these methods renamed to `GetManifestResult`.
+ - Removed `DownloadBlobAsyncResult` and changes `ContainerRegistryContentAsyncClient.downloadStream` return type to `Mono`.
+ - Removed `Collection mediaTypes` parameter from `downloadManifestWithResponse` method on blob clients.
+ - Renamed `ContainerRegistryContentClientBuilder.repository` method to `repositoryName`.
+- Renamed `GetManifestResult.getMediaType` and `UploadManifestOptions.getMediaType` to `getManifestMediaType`.
+- Removed `GetManifestResult.asOciManifest` - use `GetManifestResult.getManifest().toObject(OciImageManifest.class)` instead.
+- Renamed `OciImageManifest.getConfig` and `setConfig` methods to `getConfiguration` and `setConfiguration`.
+- Renamed `OciAnnotations.getCreated` and `setCreated` methods to `getCreatedOn` and `setCreatedOn`.
### Bugs Fixed
@@ -183,8 +195,8 @@
## 1.0.0 (2022-01-11)
### Breaking Changes
- - Renamed `ArtifactTagOrderBy` to `ArtifactTagOrder`.
- - Renamed `ArtifactManifestOrderBy` to `ArtifactManifestOrder`.
+ - Renamed `ArtifactTagOrderBy` to `ArtifactTagOrder`.
+ - Renamed `ArtifactManifestOrderBy` to `ArtifactManifestOrder`.
### Other Changes
diff --git a/sdk/containerregistry/azure-containers-containerregistry/README.md b/sdk/containerregistry/azure-containers-containerregistry/README.md
index 7cd0d1b180e2e..8cffc6ac6fe5d 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/README.md
+++ b/sdk/containerregistry/azure-containers-containerregistry/README.md
@@ -251,16 +251,16 @@ try {
### Blob and manifest operations
-This section contains samples for `ContainerRegistryBlobClient` that show how to upload and download images.
+This section contains samples for `ContainerRegistryContentClient` that show how to upload and download images.
First, we need to create blob client.
-```java readme-sample-createBlobClient
+```java readme-sample-createContentClient
DefaultAzureCredential credential = new DefaultAzureCredentialBuilder().build();
-ContainerRegistryBlobClient blobClient = new ContainerRegistryBlobClientBuilder()
+ContainerRegistryContentClient contentClient = new ContainerRegistryContentClientBuilder()
.endpoint(endpoint)
.credential(credential)
- .repository(repository)
+ .repositoryName(repository)
.buildClient();
```
@@ -272,7 +272,7 @@ which describes an image or artifact and assign it a tag.
```java readme-sample-uploadImage
BinaryData configContent = BinaryData.fromObject(Collections.singletonMap("hello", "world"));
-UploadBlobResult configUploadResult = blobClient.uploadBlob(configContent);
+UploadRegistryBlobResult configUploadResult = contentClient.uploadBlob(configContent);
System.out.printf("Uploaded config: digest - %s, size - %s\n", configUploadResult.getDigest(), configContent.getLength());
OciDescriptor configDescriptor = new OciDescriptor()
@@ -281,11 +281,11 @@ OciDescriptor configDescriptor = new OciDescriptor()
.setSizeInBytes(configContent.getLength());
BinaryData layerContent = BinaryData.fromString("Hello Azure Container Registry");
-UploadBlobResult layerUploadResult = blobClient.uploadBlob(layerContent);
+UploadRegistryBlobResult layerUploadResult = contentClient.uploadBlob(layerContent);
System.out.printf("Uploaded layer: digest - %s, size - %s\n", layerUploadResult.getDigest(), layerContent.getLength());
OciImageManifest manifest = new OciImageManifest()
- .setConfig(configDescriptor)
+ .setConfiguration(configDescriptor)
.setSchemaVersion(2)
.setLayers(Collections.singletonList(
new OciDescriptor()
@@ -293,7 +293,7 @@ OciImageManifest manifest = new OciImageManifest()
.setSizeInBytes(layerContent.getLength())
.setMediaType("application/octet-stream")));
-UploadManifestResult manifestResult = blobClient.uploadManifest(manifest, "latest");
+SetManifestResult manifestResult = contentClient.setManifest(manifest, "latest");
System.out.printf("Uploaded manifest: digest - %s\n", manifestResult.getDigest());
```
@@ -302,17 +302,17 @@ System.out.printf("Uploaded manifest: digest - %s\n", manifestResult.getDigest()
To download a full image, we need to download its manifest and then download individual layers and configuration.
```java readme-sample-downloadImage
-DownloadManifestResult manifestResult = blobClient.downloadManifest("latest");
+GetManifestResult manifestResult = contentClient.getManifest("latest");
-OciImageManifest manifest = manifestResult.asOciManifest();
+OciImageManifest manifest = manifestResult.getManifest().toObject(OciImageManifest.class);
System.out.printf("Got manifest:\n%s\n", PRETTY_PRINT.writeValueAsString(manifest));
-String configFileName = manifest.getConfig().getDigest() + ".json";
-blobClient.downloadStream(manifest.getConfig().getDigest(), createFileChannel(configFileName));
+String configFileName = manifest.getConfiguration().getDigest() + ".json";
+contentClient.downloadStream(manifest.getConfiguration().getDigest(), createFileChannel(configFileName));
System.out.printf("Got config: %s\n", configFileName);
for (OciDescriptor layer : manifest.getLayers()) {
- blobClient.downloadStream(layer.getDigest(), createFileChannel(layer.getDigest()));
+ contentClient.downloadStream(layer.getDigest(), createFileChannel(layer.getDigest()));
System.out.printf("Got layer: %s\n", layer.getDigest());
}
```
@@ -320,19 +320,19 @@ for (OciDescriptor layer : manifest.getLayers()) {
#### Delete blob
```java readme-sample-deleteBlob
-DownloadManifestResult manifestResult = blobClient.downloadManifest("latest");
+GetManifestResult manifestResult = contentClient.getManifest("latest");
-OciImageManifest manifest = manifestResult.asOciManifest();
+OciImageManifest manifest = manifestResult.getManifest().toObject(OciImageManifest.class);
for (OciDescriptor layer : manifest.getLayers()) {
- blobClient.deleteBlob(layer.getDigest());
+ contentClient.deleteBlob(layer.getDigest());
}
```
#### Delete manifest
```java readme-sample-deleteManifest
-DownloadManifestResult manifestResult = blobClient.downloadManifest("latest");
-blobClient.deleteManifest(manifestResult.getDigest());
+GetManifestResult manifestResult = contentClient.getManifest("latest");
+contentClient.deleteManifest(manifestResult.getDigest());
```
## Troubleshooting
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/specialized/ContainerRegistryBlobAsyncClient.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryContentAsyncClient.java
similarity index 76%
rename from sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/specialized/ContainerRegistryBlobAsyncClient.java
rename to sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryContentAsyncClient.java
index 562bebc18c92d..91bb0ac3782ca 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/specialized/ContainerRegistryBlobAsyncClient.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryContentAsyncClient.java
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-package com.azure.containers.containerregistry.specialized;
+package com.azure.containers.containerregistry;
import com.azure.containers.containerregistry.implementation.AzureContainerRegistryImpl;
import com.azure.containers.containerregistry.implementation.ConstructorAccessors;
@@ -9,13 +9,12 @@
import com.azure.containers.containerregistry.implementation.ContainerRegistryBlobsImpl;
import com.azure.containers.containerregistry.implementation.UtilsImpl;
import com.azure.containers.containerregistry.implementation.models.ContainerRegistryBlobsGetChunkHeaders;
-import com.azure.containers.containerregistry.models.DownloadBlobAsyncResult;
-import com.azure.containers.containerregistry.models.DownloadManifestResult;
+import com.azure.containers.containerregistry.models.GetManifestResult;
import com.azure.containers.containerregistry.models.ManifestMediaType;
import com.azure.containers.containerregistry.models.OciImageManifest;
-import com.azure.containers.containerregistry.models.UploadBlobResult;
-import com.azure.containers.containerregistry.models.UploadManifestOptions;
-import com.azure.containers.containerregistry.models.UploadManifestResult;
+import com.azure.containers.containerregistry.models.UploadRegistryBlobResult;
+import com.azure.containers.containerregistry.models.SetManifestOptions;
+import com.azure.containers.containerregistry.models.SetManifestResult;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceClient;
import com.azure.core.annotation.ServiceMethod;
@@ -39,7 +38,6 @@
import java.nio.ByteBuffer;
import java.security.MessageDigest;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.List;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicReference;
@@ -48,13 +46,14 @@
import static com.azure.containers.containerregistry.implementation.UtilsImpl.CHUNK_SIZE;
import static com.azure.containers.containerregistry.implementation.UtilsImpl.DOCKER_DIGEST_HEADER_NAME;
import static com.azure.containers.containerregistry.implementation.UtilsImpl.DOWNLOAD_BLOB_SPAN_NAME;
+import static com.azure.containers.containerregistry.implementation.UtilsImpl.SUPPORTED_MANIFEST_TYPES;
import static com.azure.containers.containerregistry.implementation.UtilsImpl.UPLOAD_BLOB_SPAN_NAME;
import static com.azure.containers.containerregistry.implementation.UtilsImpl.computeDigest;
import static com.azure.containers.containerregistry.implementation.UtilsImpl.createSha256;
import static com.azure.containers.containerregistry.implementation.UtilsImpl.getBlobSize;
-import static com.azure.containers.containerregistry.implementation.UtilsImpl.getContentTypeString;
import static com.azure.containers.containerregistry.implementation.UtilsImpl.getLocation;
-import static com.azure.containers.containerregistry.implementation.UtilsImpl.toDownloadManifestResponse;
+import static com.azure.containers.containerregistry.implementation.UtilsImpl.toGetManifestResponse;
+import static com.azure.containers.containerregistry.implementation.UtilsImpl.validateDigest;
import static com.azure.containers.containerregistry.implementation.UtilsImpl.validateResponseHeaderDigest;
import static com.azure.core.util.CoreUtils.bytesToHexString;
import static com.azure.core.util.FluxUtil.monoError;
@@ -64,20 +63,20 @@
* This class provides a client that exposes operations to push and pull images into container registry.
* It exposes methods that upload, download and delete artifacts from the registry i.e. images and manifests.
*
- * View {@link ContainerRegistryBlobClientBuilder this} for additional ways to construct the client.
+ * View {@link ContainerRegistryContentClientBuilder this} for additional ways to construct the client.
*
- * @see ContainerRegistryBlobClientBuilder
+ * @see ContainerRegistryContentClientBuilder
*/
-@ServiceClient(builder = ContainerRegistryBlobClientBuilder.class, isAsync = true)
-public final class ContainerRegistryBlobAsyncClient {
+@ServiceClient(builder = ContainerRegistryContentClientBuilder.class, isAsync = true)
+public final class ContainerRegistryContentAsyncClient {
private final ContainerRegistryBlobsImpl blobsImpl;
private final ContainerRegistriesImpl registriesImpl;
private final String endpoint;
private final String repositoryName;
private final Tracer tracer;
- private static final ClientLogger LOGGER = new ClientLogger(ContainerRegistryBlobAsyncClient.class);
+ private static final ClientLogger LOGGER = new ClientLogger(ContainerRegistryContentAsyncClient.class);
- ContainerRegistryBlobAsyncClient(String repositoryName, HttpPipeline httpPipeline, String endpoint, String version, Tracer tracer) {
+ ContainerRegistryContentAsyncClient(String repositoryName, HttpPipeline httpPipeline, String endpoint, String version, Tracer tracer) {
this.repositoryName = repositoryName;
this.endpoint = endpoint;
AzureContainerRegistryImpl registryImplClient = new AzureContainerRegistryImpl(httpPipeline, endpoint, version);
@@ -109,15 +108,15 @@ public String getEndpoint() {
*
* Code Samples:
*
- *
+ *
*
* OciImageManifest manifest = new OciImageManifest()
- * .setConfig(configDescriptor)
+ * .setConfiguration(configDescriptor)
* .setSchemaVersion(2)
* .setLayers(Collections.singletonList(layerDescriptor));
- * Mono<UploadManifestResult> result = blobClient.uploadManifest(manifest, "latest");
+ * Mono<SetManifestResult> result = contentClient.setManifest(manifest, "latest");
*
- *
+ *
*
* @see Oci Manifest Specification
* @param manifest The {@link OciImageManifest} that needs to be uploaded.
@@ -127,12 +126,12 @@ public String getEndpoint() {
* @throws NullPointerException thrown if the {@code manifest} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono uploadManifest(OciImageManifest manifest, String tag) {
+ public Mono setManifest(OciImageManifest manifest, String tag) {
if (manifest == null) {
return monoError(LOGGER, new NullPointerException("'manifest' can't be null."));
}
- return withContext(context -> uploadManifestWithResponse(BinaryData.fromObject(manifest), tag, ManifestMediaType.OCI_MANIFEST, context))
+ return withContext(context -> setManifestWithResponse(BinaryData.fromObject(manifest), tag, ManifestMediaType.OCI_MANIFEST, context))
.flatMap(FluxUtil::toMono);
}
@@ -143,10 +142,10 @@ public Mono uploadManifest(OciImageManifest manifest, Stri
*
*
*
- * UploadManifestOptions options = new UploadManifestOptions(manifestList, DOCKER_MANIFEST_LIST_TYPE)
+ * SetManifestOptions options = new SetManifestOptions(manifestList, DOCKER_MANIFEST_LIST_TYPE)
* .setTag("v2");
*
- * blobClient.uploadManifestWithResponse(options)
+ * contentClient.setManifestWithResponse(options)
* .subscribe(response ->
* System.out.println("Manifest uploaded, digest - " + response.getValue().getDigest()));
*
@@ -159,12 +158,12 @@ public Mono uploadManifest(OciImageManifest manifest, Stri
* @throws NullPointerException thrown if the {@code data} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> uploadManifestWithResponse(UploadManifestOptions options) {
+ public Mono> setManifestWithResponse(SetManifestOptions options) {
if (options == null) {
return monoError(LOGGER, new NullPointerException("'options' can't be null."));
}
- return withContext(context -> this.uploadManifestWithResponse(options.getManifest(), options.getTag(), options.getMediaType(), context));
+ return withContext(context -> this.setManifestWithResponse(options.getManifest(), options.getTag(), options.getManifestMediaType(), context));
}
/**
@@ -176,7 +175,7 @@ public Mono> uploadManifestWithResponse(UploadMan
*
* BinaryData configContent = BinaryData.fromObject(Collections.singletonMap("hello", "world"));
*
- * blobClient
+ * contentClient
* .uploadBlob(configContent)
* .subscribe(uploadResult -> System.out.printf("Uploaded blob: digest - '%s', size - %s\n",
* uploadResult.getDigest(), uploadResult.getSizeInBytes()));
@@ -187,18 +186,18 @@ public Mono> uploadManifestWithResponse(UploadMan
* sizes. Buffers that are bigger than 4MB are broken down into smaller chunks, but small buffers are not aggregated.
* To decrease number of chunks for big content, use buffers of 4MB size.
*
- * @param data The blob content that needs to be uploaded.
+ * @param content The blob content that needs to be uploaded.
* @return The operation result.
* @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code data} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono uploadBlob(BinaryData data) {
- if (data == null) {
- return monoError(LOGGER, new NullPointerException("'data' can't be null."));
+ public Mono uploadBlob(BinaryData content) {
+ if (content == null) {
+ return monoError(LOGGER, new NullPointerException("'content' can't be null."));
}
- return uploadBlob(data.toFluxByteBuffer());
+ return uploadBlob(content.toFluxByteBuffer());
}
/**
@@ -210,7 +209,7 @@ public Mono uploadBlob(BinaryData data) {
*
* Flux.using(
* () -> new FileInputStream("artifact.tar.gz"),
- * fileStream -> blobClient.uploadBlob(FluxUtil.toFluxByteBuffer(fileStream, CHUNK_SIZE)),
+ * fileStream -> contentClient.uploadBlob(FluxUtil.toFluxByteBuffer(fileStream, CHUNK_SIZE)),
* this::closeStream)
* .subscribe(uploadResult ->
* System.out.printf("Uploaded blob: digest - '%s', size - %s\n",
@@ -222,14 +221,14 @@ public Mono uploadBlob(BinaryData data) {
* sizes. Buffers that are bigger than 4MB are broken down into smaller chunks, but small buffers are not aggregated.
* To decrease number of chunks for big content, use buffers of 4MB size.
*
- * @param data The blob content that needs to be uploaded.
+ * @param content The blob content that needs to be uploaded.
* @return The rest response containing the operation result.
* @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code data} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono uploadBlob(Flux data) {
- return withContext(context -> runWithTracing(UPLOAD_BLOB_SPAN_NAME, span -> uploadBlob(data, span), context));
+ public Mono uploadBlob(Flux content) {
+ return withContext(context -> runWithTracing(UPLOAD_BLOB_SPAN_NAME, span -> uploadBlob(content, span), context));
}
/**
@@ -237,21 +236,21 @@ public Mono uploadBlob(Flux data) {
*
* Code Samples:
*
- *
+ *
*
- * blobClient.downloadManifest("latest")
+ * contentClient.getManifest("latest")
* .doOnNext(downloadResult -> {
- * if (ManifestMediaType.OCI_MANIFEST.equals(downloadResult.getMediaType())
- * || ManifestMediaType.DOCKER_MANIFEST.equals(downloadResult.getMediaType())) {
- * OciImageManifest manifest = downloadResult.asOciManifest();
+ * if (ManifestMediaType.OCI_MANIFEST.equals(downloadResult.getManifestMediaType())
+ * || ManifestMediaType.DOCKER_MANIFEST.equals(downloadResult.getManifestMediaType())) {
+ * OciImageManifest manifest = downloadResult.getManifest().toObject(OciImageManifest.class);
* System.out.println("Got OCI manifest");
* } else {
- * throw new IllegalArgumentException("Unexpected manifest type: " + downloadResult.getMediaType());
+ * throw new IllegalArgumentException("Unexpected manifest type: " + downloadResult.getManifestMediaType());
* }
* })
* .block();
*
- *
+ *
*
* @see Oci Manifest Specification
*
@@ -261,8 +260,8 @@ public Mono uploadBlob(Flux data) {
* @throws NullPointerException thrown if the {@code tagOrDigest} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono downloadManifest(String tagOrDigest) {
- return withContext(context -> this.downloadManifestWithResponse(tagOrDigest, null, context)).flatMap(FluxUtil::toMono);
+ public Mono getManifest(String tagOrDigest) {
+ return withContext(context -> this.getManifestWithResponse(tagOrDigest, context)).flatMap(FluxUtil::toMono);
}
/**
@@ -270,40 +269,31 @@ public Mono downloadManifest(String tagOrDigest) {
*
* Code Samples:
*
- *
+ *
*
- * ManifestMediaType dockerListType = ManifestMediaType
- * .fromString("application/vnd.docker.distribution.manifest.list.v2+json");
- * ManifestMediaType ociIndexType = ManifestMediaType
- * .fromString("application/vnd.oci.image.index.v1+json");
- *
- * blobClient.downloadManifestWithResponse("latest", Arrays.asList(dockerListType, ociIndexType))
- * .doOnNext(downloadResult -> {
- * if (dockerListType.equals(downloadResult.getValue().getMediaType())) {
- * // DockerManifestList manifestList =
- * // downloadResult.getValue().getContent().toObject(DockerManifestList.class);
- * System.out.println("Got docker manifest list");
- * } else if (ociIndexType.equals(downloadResult.getValue().getMediaType())) {
- * // OciIndex ociIndex = downloadResult.getValue().getContent().toObject(OciIndex.class);
- * System.out.println("Got OCI index");
+ * contentClient.getManifestWithResponse("latest")
+ * .doOnNext(response -> {
+ * GetManifestResult manifestResult = response.getValue();
+ * if (ManifestMediaType.OCI_MANIFEST.equals(manifestResult.getManifestMediaType())
+ * || ManifestMediaType.DOCKER_MANIFEST.equals(manifestResult.getManifestMediaType())) {
+ * OciImageManifest manifest = manifestResult.getManifest().toObject(OciImageManifest.class);
+ * System.out.println("Got OCI manifest");
* } else {
- * throw new IllegalArgumentException("Got unexpected content type: "
- * + downloadResult.getValue().getMediaType());
+ * throw new IllegalArgumentException("Unexpected manifest type: " + manifestResult.getManifestMediaType());
* }
* })
* .block();
*
- *
+ *
*
* @param tagOrDigest Manifest reference which can be tag or digest.
- * @param mediaTypes List of {@link ManifestMediaType} to request.
* @return The response for the manifest identified by the given tag or digest.
* @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code tagOrDigest} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> downloadManifestWithResponse(String tagOrDigest, Collection mediaTypes) {
- return withContext(context -> this.downloadManifestWithResponse(tagOrDigest, mediaTypes, context));
+ public Mono> getManifestWithResponse(String tagOrDigest) {
+ return withContext(context -> this.getManifestWithResponse(tagOrDigest, context));
}
/**
@@ -316,11 +306,12 @@ public Mono> downloadManifestWithResponse(Strin
*
*
*
- * blobClient
+ * contentClient
* .downloadStream(digest)
* .flatMap(downloadResult ->
* Mono.using(() -> new FileOutputStream(trimSha(digest)),
- * fileStream -> downloadResult.writeValueTo(fileStream.getChannel()),
+ * fileStream -> FluxUtil.writeToWritableByteChannel(
+ * downloadResult.toFluxByteBuffer(), fileStream.getChannel()),
* fileStream -> closeStream(fileStream)))
* .block();
*
@@ -330,12 +321,12 @@ public Mono> downloadManifestWithResponse(Strin
*
*
*
- * blobClient
+ * contentClient
* .downloadStream(digest)
* .flatMap(downloadResult ->
* Mono.using(
* () -> openSocket(),
- * socket -> downloadResult.writeValueToAsync(socket),
+ * socket -> FluxUtil.writeToAsynchronousByteChannel(downloadResult.toFluxByteBuffer(), socket),
* socket -> closeStream(socket)))
* .block();
*
@@ -347,7 +338,7 @@ public Mono> downloadManifestWithResponse(Strin
* @throws NullPointerException thrown if the {@code digest} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono downloadStream(String digest) {
+ public Mono downloadStream(String digest) {
return withContext(context ->
runWithTracing(DOWNLOAD_BLOB_SPAN_NAME, span -> downloadBlobInternal(digest, span), context));
}
@@ -359,8 +350,8 @@ public Mono downloadStream(String digest) {
*
*
*
- * blobClient.downloadManifest("latest")
- * .flatMap(manifest -> blobClient.deleteBlob(manifest.getDigest()))
+ * contentClient.getManifest("latest")
+ * .flatMap(manifest -> contentClient.deleteBlob(manifest.getDigest()))
* .block();
*
*
@@ -395,8 +386,8 @@ public Mono> deleteBlobWithResponse(String digest) {
*
*
*
- * blobClient.downloadManifest("latest")
- * .flatMap(manifest -> blobClient.deleteManifest(manifest.getDigest()))
+ * contentClient.getManifest("latest")
+ * .flatMap(manifest -> contentClient.deleteManifest(manifest.getDigest()))
* .block();
*
*
@@ -424,7 +415,7 @@ public Mono> deleteManifestWithResponse(String digest) {
return withContext(context -> deleteManifestWithResponse(digest, context));
}
- private Mono> uploadManifestWithResponse(BinaryData manifestData, String tagOrDigest, ManifestMediaType manifestMediaType, Context context) {
+ private Mono> setManifestWithResponse(BinaryData manifestData, String tagOrDigest, ManifestMediaType manifestMediaType, Context context) {
ByteBuffer data = manifestData.toByteBuffer();
if (tagOrDigest == null) {
tagOrDigest = computeDigest(data);
@@ -438,26 +429,24 @@ private Mono> uploadManifestWithResponse(BinaryDa
data.remaining(),
manifestMediaType.toString(),
context)
- .map(response -> (Response)
+ .map(response -> (Response)
new ResponseBase<>(
response.getRequest(),
response.getStatusCode(),
response.getHeaders(),
- ConstructorAccessors.createUploadManifestResult(response.getDeserializedHeaders().getDockerContentDigest()),
+ ConstructorAccessors.createSetManifestResult(response.getDeserializedHeaders().getDockerContentDigest()),
response.getDeserializedHeaders()))
.onErrorMap(UtilsImpl::mapException);
}
- private Mono> downloadManifestWithResponse(String tagOrDigest, Collection mediaTypes, Context context) {
+ private Mono> getManifestWithResponse(String tagOrDigest, Context context) {
if (tagOrDigest == null) {
return monoError(LOGGER, new NullPointerException("'tagOrDigest' can't be null."));
}
- String requestMediaTypes = getContentTypeString(mediaTypes);
-
- return registriesImpl.getManifestWithResponseAsync(repositoryName, tagOrDigest, requestMediaTypes, context)
- .map(response -> toDownloadManifestResponse(tagOrDigest, response))
+ return registriesImpl.getManifestWithResponseAsync(repositoryName, tagOrDigest, SUPPORTED_MANIFEST_TYPES, context)
+ .map(response -> toGetManifestResponse(tagOrDigest, response))
.onErrorMap(UtilsImpl::mapException);
}
@@ -497,7 +486,7 @@ private static Flux chunkSource(Flux data, MessageDigest
}, 1, 1);
}
- private Mono downloadBlobInternal(String digest, Context context) {
+ private Mono downloadBlobInternal(String digest, Context context) {
if (digest == null) {
return monoError(LOGGER, new NullPointerException("'digest' can't be null."));
}
@@ -506,7 +495,14 @@ private Mono downloadBlobInternal(String digest, Contex
blobsImpl.getChunkWithResponseAsync(repositoryName, digest, new HttpRange(0, (long) CHUNK_SIZE).toString(), context)
.flatMapMany(firstResponse -> getAllChunks(firstResponse, digest, context))
.flatMapSequential(chunk -> chunk.getValue().toFluxByteBuffer(), 1);
- return Mono.just(ConstructorAccessors.createDownloadBlobResult(digest, content));
+
+ MessageDigest sha256 = createSha256();
+ content = content
+ .doOnNext(buffer -> sha256.update(buffer.asReadOnlyBuffer()))
+ .doOnComplete(() -> validateDigest(sha256, digest))
+ .doOnError(UtilsImpl::mapException);
+
+ return BinaryData.fromFlux(content, null, false);
}
private Flux> getAllChunks(
@@ -555,21 +551,21 @@ private Mono upload(Flux data, String location, Context cont
.last();
}
- private Mono uploadBlob(Flux data, Context context) {
- if (data == null) {
- return monoError(LOGGER, new NullPointerException("'data' can't be null."));
+ private Mono uploadBlob(Flux content, Context context) {
+ if (content == null) {
+ return monoError(LOGGER, new NullPointerException("'content' can't be null."));
}
AtomicLong streamLength = new AtomicLong(0);
MessageDigest sha256 = createSha256();
- Flux chunks = chunkSource(data, sha256, streamLength);
+ Flux chunks = chunkSource(content, sha256, streamLength);
return blobsImpl
.startUploadWithResponseAsync(repositoryName, context)
.flatMap(response -> upload(chunks, getLocation(response), context))
// TODO (limolkova) if we knew when's the last chunk, we could upload it in complete call instead.
.flatMap(location -> blobsImpl.completeUploadWithResponseAsync("sha256:" + bytesToHexString(sha256.digest()), location, (BinaryData) null, 0L, context))
- .map(response -> ConstructorAccessors.createUploadBlobResult(response.getHeaders().getValue(DOCKER_DIGEST_HEADER_NAME), streamLength.get()))
+ .map(response -> ConstructorAccessors.createUploadRegistryBlobResult(response.getHeaders().getValue(DOCKER_DIGEST_HEADER_NAME), streamLength.get()))
.onErrorMap(UtilsImpl::mapException);
}
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/specialized/ContainerRegistryBlobClient.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryContentClient.java
similarity index 74%
rename from sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/specialized/ContainerRegistryBlobClient.java
rename to sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryContentClient.java
index 10f8b340d73f7..03f9c58765559 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/specialized/ContainerRegistryBlobClient.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryContentClient.java
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-package com.azure.containers.containerregistry.specialized;
+package com.azure.containers.containerregistry;
import com.azure.containers.containerregistry.implementation.AzureContainerRegistryImpl;
import com.azure.containers.containerregistry.implementation.ConstructorAccessors;
@@ -13,12 +13,12 @@
import com.azure.containers.containerregistry.implementation.models.ContainerRegistryBlobsCompleteUploadHeaders;
import com.azure.containers.containerregistry.implementation.models.ContainerRegistryBlobsStartUploadHeaders;
import com.azure.containers.containerregistry.implementation.models.ContainerRegistryBlobsUploadChunkHeaders;
-import com.azure.containers.containerregistry.models.DownloadManifestResult;
+import com.azure.containers.containerregistry.models.GetManifestResult;
import com.azure.containers.containerregistry.models.ManifestMediaType;
import com.azure.containers.containerregistry.models.OciImageManifest;
-import com.azure.containers.containerregistry.models.UploadBlobResult;
-import com.azure.containers.containerregistry.models.UploadManifestOptions;
-import com.azure.containers.containerregistry.models.UploadManifestResult;
+import com.azure.containers.containerregistry.models.UploadRegistryBlobResult;
+import com.azure.containers.containerregistry.models.SetManifestOptions;
+import com.azure.containers.containerregistry.models.SetManifestResult;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceClient;
import com.azure.core.annotation.ServiceMethod;
@@ -45,21 +45,20 @@
import java.nio.channels.ReadableByteChannel;
import java.nio.channels.WritableByteChannel;
import java.security.MessageDigest;
-import java.util.Collection;
import java.util.Objects;
import java.util.function.Function;
import static com.azure.containers.containerregistry.implementation.UtilsImpl.CHUNK_SIZE;
import static com.azure.containers.containerregistry.implementation.UtilsImpl.DOWNLOAD_BLOB_SPAN_NAME;
+import static com.azure.containers.containerregistry.implementation.UtilsImpl.SUPPORTED_MANIFEST_TYPES;
import static com.azure.containers.containerregistry.implementation.UtilsImpl.UPLOAD_BLOB_SPAN_NAME;
import static com.azure.containers.containerregistry.implementation.UtilsImpl.computeDigest;
import static com.azure.containers.containerregistry.implementation.UtilsImpl.createSha256;
import static com.azure.containers.containerregistry.implementation.UtilsImpl.deleteResponseToSuccess;
import static com.azure.containers.containerregistry.implementation.UtilsImpl.getBlobSize;
-import static com.azure.containers.containerregistry.implementation.UtilsImpl.getContentTypeString;
import static com.azure.containers.containerregistry.implementation.UtilsImpl.getLocation;
import static com.azure.containers.containerregistry.implementation.UtilsImpl.mapAcrErrorsException;
-import static com.azure.containers.containerregistry.implementation.UtilsImpl.toDownloadManifestResponse;
+import static com.azure.containers.containerregistry.implementation.UtilsImpl.toGetManifestResponse;
import static com.azure.containers.containerregistry.implementation.UtilsImpl.validateDigest;
import static com.azure.containers.containerregistry.implementation.UtilsImpl.validateResponseHeaderDigest;
import static com.azure.core.util.CoreUtils.bytesToHexString;
@@ -68,13 +67,13 @@
* This class provides a client that exposes operations to push and pull images into container registry.
* It exposes methods that upload, download and delete artifacts from the registry i.e. images and manifests.
*
- * View {@link ContainerRegistryBlobClientBuilder this} for additional ways to construct the client.
+ * View {@link ContainerRegistryContentClientBuilder this} for additional ways to construct the client.
*
- * @see ContainerRegistryBlobClientBuilder
+ * @see ContainerRegistryContentClientBuilder
*/
-@ServiceClient(builder = ContainerRegistryBlobClientBuilder.class)
-public final class ContainerRegistryBlobClient {
- private static final ClientLogger LOGGER = new ClientLogger(ContainerRegistryBlobClient.class);
+@ServiceClient(builder = ContainerRegistryContentClientBuilder.class)
+public final class ContainerRegistryContentClient {
+ private static final ClientLogger LOGGER = new ClientLogger(ContainerRegistryContentClient.class);
private final ContainerRegistryBlobsImpl blobsImpl;
private final ContainerRegistriesImpl registriesImpl;
@@ -82,7 +81,7 @@ public final class ContainerRegistryBlobClient {
private final String repositoryName;
private final Tracer tracer;
- ContainerRegistryBlobClient(String repositoryName, HttpPipeline httpPipeline, String endpoint, String version, Tracer tracer) {
+ ContainerRegistryContentClient(String repositoryName, HttpPipeline httpPipeline, String endpoint, String version, Tracer tracer) {
this.repositoryName = repositoryName;
this.endpoint = endpoint;
AzureContainerRegistryImpl registryImplClient = new AzureContainerRegistryImpl(httpPipeline, endpoint, version);
@@ -114,11 +113,11 @@ public String getEndpoint() {
*
* Code Samples:
*
- *
+ *
*
- * blobClient.uploadManifest(manifest, "v1");
+ * contentClient.setManifest(manifest, "v1");
*
- *
+ *
*
* @see Oci Manifest Specification
*
@@ -129,9 +128,9 @@ public String getEndpoint() {
* @throws NullPointerException thrown if the {@code manifest} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public UploadManifestResult uploadManifest(OciImageManifest manifest, String tag) {
+ public SetManifestResult setManifest(OciImageManifest manifest, String tag) {
Objects.requireNonNull(manifest, "'manifest' cannot be null.");
- return uploadManifestWithResponse(BinaryData.fromObject(manifest), tag, ManifestMediaType.OCI_MANIFEST, Context.NONE).getValue();
+ return setManifestWithResponse(BinaryData.fromObject(manifest), tag, ManifestMediaType.OCI_MANIFEST, Context.NONE).getValue();
}
/**
@@ -141,9 +140,9 @@ public UploadManifestResult uploadManifest(OciImageManifest manifest, String tag
*
*
*
- * UploadManifestOptions options = new UploadManifestOptions(manifestList, DOCKER_MANIFEST_LIST_TYPE);
+ * SetManifestOptions options = new SetManifestOptions(manifestList, DOCKER_MANIFEST_LIST_TYPE);
*
- * Response<UploadManifestResult> response = blobClient.uploadManifestWithResponse(options, Context.NONE);
+ * Response<SetManifestResult> response = contentClient.setManifestWithResponse(options, Context.NONE);
* System.out.println("Manifest uploaded, digest - " + response.getValue().getDigest());
*
*
@@ -155,15 +154,15 @@ public UploadManifestResult uploadManifest(OciImageManifest manifest, String tag
* @throws NullPointerException thrown if the {@code data} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response uploadManifestWithResponse(UploadManifestOptions options, Context context) {
+ public Response setManifestWithResponse(SetManifestOptions options, Context context) {
Objects.requireNonNull(options, "'options' cannot be null.");
- return uploadManifestWithResponse(options.getManifest(), options.getTag(), options.getMediaType(), context);
+ return setManifestWithResponse(options.getManifest(), options.getTag(), options.getManifestMediaType(), context);
}
/**
* Uploads a blob to the repository in chunks of 4MB.
* Use this method to upload relatively small content that fits into memory. For large content use
- * {@link ContainerRegistryBlobClient#uploadBlob(ReadableByteChannel, Context)} overload.
+ * {@link ContainerRegistryContentClient#uploadBlob(ReadableByteChannel, Context)} overload.
*
* Code Samples
*
@@ -171,20 +170,20 @@ public Response uploadManifestWithResponse(UploadManifestO
*
* BinaryData configContent = BinaryData.fromObject(Collections.singletonMap("hello", "world"));
*
- * UploadBlobResult uploadResult = blobClient.uploadBlob(configContent);
+ * UploadRegistryBlobResult uploadResult = contentClient.uploadBlob(configContent);
* System.out.printf("Uploaded blob: digest - '%s', size - %s\n", uploadResult.getDigest(), uploadResult.getSizeInBytes());
*
*
*
- * @param data The blob content. The content may be loaded into memory depending on how {@link BinaryData} is created.
+ * @param content The blob content. The content may be loaded into memory depending on how {@link BinaryData} is created.
* @return The upload response.
* @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code data} is {@code null}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public UploadBlobResult uploadBlob(BinaryData data) {
- Objects.requireNonNull(data, "'data' cannot be null.");
- InputStream stream = data.toStream();
+ public UploadRegistryBlobResult uploadBlob(BinaryData content) {
+ Objects.requireNonNull(content, "'content' cannot be null.");
+ InputStream stream = content.toStream();
try {
return uploadBlob(Channels.newChannel(stream), Context.NONE);
} finally {
@@ -204,23 +203,23 @@ public UploadBlobResult uploadBlob(BinaryData data) {
*
*
* try (FileInputStream content = new FileInputStream("artifact.tar.gz")) {
- * UploadBlobResult uploadResult = blobClient.uploadBlob(content.getChannel(), Context.NONE);
+ * UploadRegistryBlobResult uploadResult = contentClient.uploadBlob(content.getChannel(), Context.NONE);
* System.out.printf("Uploaded blob: digest - '%s', size - %s\n",
* uploadResult.getDigest(), uploadResult.getSizeInBytes());
* }
*
*
*
- * @param stream The blob content.
+ * @param content The blob content.
* @param context Additional context that is passed through the Http pipeline during the service call.
* @return The upload response.
* @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code stream} is {@code null}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public UploadBlobResult uploadBlob(ReadableByteChannel stream, Context context) {
- Objects.requireNonNull(stream, "'stream' cannot be null.");
- return runWithTracing(UPLOAD_BLOB_SPAN_NAME, (span) -> uploadBlobInternal(stream, span), context);
+ public UploadRegistryBlobResult uploadBlob(ReadableByteChannel content, Context context) {
+ Objects.requireNonNull(content, "'content' cannot be null.");
+ return runWithTracing(UPLOAD_BLOB_SPAN_NAME, (span) -> uploadBlobInternal(content, span), context);
}
/**
@@ -230,26 +229,26 @@ public UploadBlobResult uploadBlob(ReadableByteChannel stream, Context context)
*
* Download manifest with tag:
*
- *
+ *
*
- * DownloadManifestResult latestResult = blobClient.downloadManifest("latest");
- * if (ManifestMediaType.DOCKER_MANIFEST.equals(latestResult.getMediaType())
- * || ManifestMediaType.OCI_MANIFEST.equals(latestResult.getMediaType())) {
- * OciImageManifest manifest = latestResult.asOciManifest();
+ * GetManifestResult latestResult = contentClient.getManifest("latest");
+ * if (ManifestMediaType.DOCKER_MANIFEST.equals(latestResult.getManifestMediaType())
+ * || ManifestMediaType.OCI_MANIFEST.equals(latestResult.getManifestMediaType())) {
+ * OciImageManifest manifest = latestResult.getManifest().toObject(OciImageManifest.class);
* } else {
- * throw new IllegalArgumentException("Unexpected manifest type: " + latestResult.getMediaType());
+ * throw new IllegalArgumentException("Unexpected manifest type: " + latestResult.getManifestMediaType());
* }
*
- *
+ *
*
* Download manifest with digest:
*
- *
+ *
*
- * DownloadManifestResult digestResult = blobClient.downloadManifest(
+ * GetManifestResult getManifestResult = contentClient.getManifest(
* "sha256:6581596932dc735fd0df8cc240e6c28845a66829126da5ce25b983cf244e2311");
*
- *
+ *
*
* @param tagOrDigest Manifest tag or digest.
* @return The manifest identified by the given tag or digest.
@@ -257,8 +256,8 @@ public UploadBlobResult uploadBlob(ReadableByteChannel stream, Context context)
* @throws NullPointerException thrown if the {@code tagOrDigest} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public DownloadManifestResult downloadManifest(String tagOrDigest) {
- return downloadManifestWithResponse(tagOrDigest, null, Context.NONE).getValue();
+ public GetManifestResult getManifest(String tagOrDigest) {
+ return getManifestWithResponse(tagOrDigest, Context.NONE).getValue();
}
/**
@@ -266,47 +265,29 @@ public DownloadManifestResult downloadManifest(String tagOrDigest) {
*
* Code Samples:
*
- *
+ *
*
- * ManifestMediaType dockerListType = ManifestMediaType
- * .fromString("application/vnd.docker.distribution.manifest.list.v2+json");
- * ManifestMediaType ociIndexType = ManifestMediaType
- * .fromString("application/vnd.oci.image.index.v1+json");
- *
- * Response<DownloadManifestResult> response = blobClient.downloadManifestWithResponse(
- * "latest",
- * Arrays.asList(dockerListType, ociIndexType),
+ * Response<GetManifestResult> downloadResponse = contentClient.getManifestWithResponse("latest",
* Context.NONE);
- * if (dockerListType.equals(response.getValue().getMediaType())) {
- * // DockerManifestList manifestList = downloadResult.getValue().getContent().toObject(DockerManifestList.class);
- * System.out.println("Got docker manifest list");
- * } else if (ociIndexType.equals(response.getValue().getMediaType())) {
- * // OciIndex ociIndex = downloadResult.getValue().getContent().toObject(OciIndex.class);
- * System.out.println("Got OCI index");
- * } else {
- * throw new IllegalArgumentException("Got unexpected manifest type: " + response.getValue().getMediaType());
- * }
+ * System.out.printf("Received manifest: digest - %s, response code: %s\n", downloadResponse.getValue().getDigest(),
+ * downloadResponse.getStatusCode());
*
- *
+ *
*
* @param tagOrDigest Manifest reference which can be tag or digest.
- * @param mediaTypes List of {@link ManifestMediaType} to request.
* @param context Additional context that is passed through the Http pipeline during the service call.
* @return The response for the manifest identified by the given tag or digest.
* @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code tagOrDigest} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response downloadManifestWithResponse(String tagOrDigest, Collection mediaTypes, Context context) {
+ public Response getManifestWithResponse(String tagOrDigest, Context context) {
Objects.requireNonNull(tagOrDigest, "'tagOrDigest' cannot be null.");
- String requestMediaTypes = getContentTypeString(mediaTypes);
-
try {
Response response =
- registriesImpl.getManifestWithResponse(repositoryName, tagOrDigest,
- requestMediaTypes, context);
- return toDownloadManifestResponse(tagOrDigest, response);
+ registriesImpl.getManifestWithResponse(repositoryName, tagOrDigest, SUPPORTED_MANIFEST_TYPES, context);
+ return toGetManifestResponse(tagOrDigest, response);
} catch (AcrErrorsException exception) {
throw LOGGER.logExceptionAsError(mapAcrErrorsException(exception));
}
@@ -321,7 +302,7 @@ public Response downloadManifestWithResponse(String tagO
*
* Path file = Files.createTempFile(digest, ".tmp");
* SeekableByteChannel channel = Files.newByteChannel(file, StandardOpenOption.CREATE_NEW, StandardOpenOption.WRITE);
- * blobClient.downloadStream(digest, channel);
+ * contentClient.downloadStream(digest, channel);
*
*
*
@@ -342,16 +323,14 @@ public void downloadStream(String digest, WritableByteChannel channel) {
* @param digest The digest for the given image layer.
* @param channel The channel to write content to.
* @param context Additional context that is passed through the Http pipeline during the service call.
+ *
* @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code digest} is null.
* @throws ServiceResponseException thrown if content hash does not match requested digest.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void downloadStream(String digest, WritableByteChannel channel, Context context) {
- runWithTracing(DOWNLOAD_BLOB_SPAN_NAME, (span) -> {
- downloadBlobInternal(digest, channel, span);
- return null;
- }, context);
+ runWithTracing(DOWNLOAD_BLOB_SPAN_NAME, (span) -> downloadBlobInternal(digest, channel, span), context);
}
/**
@@ -361,11 +340,11 @@ public void downloadStream(String digest, WritableByteChannel channel, Context c
*
*
*
- * DownloadManifestResult manifestResult = blobClient.downloadManifest("latest");
+ * GetManifestResult manifestResult = contentClient.getManifest("latest");
*
- * OciImageManifest manifest = manifestResult.asOciManifest();
+ * OciImageManifest manifest = manifestResult.getManifest().toObject(OciImageManifest.class);
* for (OciDescriptor layer : manifest.getLayers()) {
- * blobClient.deleteBlob(layer.getDigest());
+ * contentClient.deleteBlob(layer.getDigest());
* }
*
*
@@ -414,8 +393,8 @@ public Response deleteBlobWithResponse(String digest, Context context) {
*
*
*
- * DownloadManifestResult manifestResult = blobClient.downloadManifest("latest");
- * blobClient.deleteManifest(manifestResult.getDigest());
+ * GetManifestResult manifestResult = contentClient.getManifest("latest");
+ * contentClient.deleteManifest(manifestResult.getDigest());
*
*
*
@@ -447,7 +426,7 @@ public Response deleteManifestWithResponse(String digest, Context context)
}
}
- private UploadBlobResult uploadBlobInternal(ReadableByteChannel stream, Context context) {
+ private UploadRegistryBlobResult uploadBlobInternal(ReadableByteChannel stream, Context context) {
MessageDigest sha256 = createSha256();
byte[] buffer = new byte[CHUNK_SIZE];
@@ -479,7 +458,7 @@ private UploadBlobResult uploadBlobInternal(ReadableByteChannel stream, Context
ResponseBase completeUploadResponse =
blobsImpl.completeUploadWithResponse(digest, location, chunk, chunk == null ? null : chunk.getLength(), context);
- return ConstructorAccessors.createUploadBlobResult(completeUploadResponse.getDeserializedHeaders().getDockerContentDigest(), streamLength);
+ return ConstructorAccessors.createUploadRegistryBlobResult(completeUploadResponse.getDeserializedHeaders().getDockerContentDigest(), streamLength);
} catch (AcrErrorsException ex) {
throw LOGGER.logExceptionAsError(mapAcrErrorsException(ex));
}
@@ -505,7 +484,7 @@ private BinaryData readChunk(ReadableByteChannel stream, MessageDigest sha256, b
return BinaryData.fromByteBuffer(byteBuffer);
}
- private Response uploadManifestWithResponse(BinaryData manifestData, String tagOrDigest, ManifestMediaType manifestMediaType, Context context) {
+ private Response setManifestWithResponse(BinaryData manifestData, String tagOrDigest, ManifestMediaType manifestMediaType, Context context) {
BinaryData data = manifestData.toReplayableBinaryData();
if (tagOrDigest == null) {
tagOrDigest = computeDigest(data.toByteBuffer());
@@ -520,23 +499,23 @@ private Response uploadManifestWithResponse(BinaryData man
response.getRequest(),
response.getStatusCode(),
response.getHeaders(),
- ConstructorAccessors.createUploadManifestResult(response.getDeserializedHeaders().getDockerContentDigest()),
+ ConstructorAccessors.createSetManifestResult(response.getDeserializedHeaders().getDockerContentDigest()),
response.getDeserializedHeaders());
} catch (AcrErrorsException exception) {
throw LOGGER.logExceptionAsError(mapAcrErrorsException(exception));
}
}
- private void downloadBlobInternal(String digest, WritableByteChannel channel, Context context) {
+ private Context downloadBlobInternal(String digest, WritableByteChannel channel, Context context) {
Objects.requireNonNull(digest, "'digest' cannot be null.");
MessageDigest sha256 = createSha256();
try {
- Response firstChunk = readRange(digest, new HttpRange(0, (long) CHUNK_SIZE), channel, sha256, context);
- validateResponseHeaderDigest(digest, firstChunk.getHeaders());
+ Response lastChunk = readRange(digest, new HttpRange(0, (long) CHUNK_SIZE), channel, sha256, context);
+ validateResponseHeaderDigest(digest, lastChunk.getHeaders());
- long blobSize = getBlobSize(firstChunk.getHeaders().get(HttpHeaderName.CONTENT_RANGE));
- for (long p = firstChunk.getValue().getLength(); p < blobSize; p += CHUNK_SIZE) {
+ long blobSize = getBlobSize(lastChunk.getHeaders().get(HttpHeaderName.CONTENT_RANGE));
+ for (long p = lastChunk.getValue().getLength(); p < blobSize; p += CHUNK_SIZE) {
readRange(digest, new HttpRange(p, (long) CHUNK_SIZE), channel, sha256, context);
}
} catch (AcrErrorsException exception) {
@@ -544,6 +523,8 @@ private void downloadBlobInternal(String digest, WritableByteChannel channel, Co
}
validateDigest(sha256, digest);
+
+ return context;
}
private Response readRange(String digest, HttpRange range, WritableByteChannel channel, MessageDigest sha256, Context context) {
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/specialized/ContainerRegistryBlobClientBuilder.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryContentClientBuilder.java
similarity index 78%
rename from sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/specialized/ContainerRegistryBlobClientBuilder.java
rename to sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryContentClientBuilder.java
index 5c6b6a88ad94f..461fe18712b5f 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/specialized/ContainerRegistryBlobClientBuilder.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryContentClientBuilder.java
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-package com.azure.containers.containerregistry.specialized;
+package com.azure.containers.containerregistry;
-import com.azure.containers.containerregistry.ContainerRegistryServiceVersion;
import com.azure.containers.containerregistry.implementation.UtilsImpl;
import com.azure.containers.containerregistry.models.ContainerRegistryAudience;
import com.azure.core.annotation.ServiceClientBuilder;
@@ -35,15 +34,15 @@
/**
* This class provides a fluent builder API to help aid the configuration and instantiation of {@link
- * ContainerRegistryBlobClient ContainerRegistryBlobClients} and {@link ContainerRegistryBlobAsyncClient ContainerRegistryBlobAsyncClients}, call {@link
+ * ContainerRegistryContentClient ContainerRegistryContentClients} and {@link ContainerRegistryContentAsyncClient ContainerRegistryContentAsyncClients}, call {@link
* #buildClient() buildClient} and {@link #buildAsyncClient() buildAsyncClient} respectively to construct an instance of
* the desired client.
*
* Another way to construct the client is using a {@link HttpPipeline}. The pipeline gives the client an
* authenticated way to communicate with the service but it doesn't contain the service endpoint. Set the pipeline with
* {@link #pipeline(HttpPipeline) this} and set the service endpoint with {@link #endpoint(String) this}. Using a
- * pipeline requires additional setup but allows for finer control on how the {@link ContainerRegistryBlobClient} and {@link
- * ContainerRegistryBlobAsyncClient} is built.
+ * pipeline requires additional setup but allows for finer control on how the {@link ContainerRegistryContentClient} and {@link
+ * ContainerRegistryContentAsyncClient} is built.
* The service does not directly support AAD credentials and as a result the clients internally depend on a policy that converts
* the AAD credentials to the Azure Container Registry specific service credentials. In case you use your own pipeline, you
* would need to provide implementation for this policy as well.
@@ -52,15 +51,15 @@
*/
@ServiceClientBuilder(
serviceClients = {
- ContainerRegistryBlobAsyncClient.class,
- ContainerRegistryBlobClient.class
+ ContainerRegistryContentAsyncClient.class,
+ ContainerRegistryContentClient.class
})
-public final class ContainerRegistryBlobClientBuilder implements
- ConfigurationTrait,
- EndpointTrait,
- HttpTrait,
- TokenCredentialTrait {
- private static final ClientLogger LOGGER = new ClientLogger(ContainerRegistryBlobClientBuilder.class);
+public final class ContainerRegistryContentClientBuilder implements
+ ConfigurationTrait,
+ EndpointTrait,
+ HttpTrait,
+ TokenCredentialTrait {
+ private static final ClientLogger LOGGER = new ClientLogger(ContainerRegistryContentClientBuilder.class);
private final List perCallPolicies = new ArrayList<>();
private final List perRetryPolicies = new ArrayList<>();
@@ -81,11 +80,11 @@ public final class ContainerRegistryBlobClientBuilder implements
* Sets the service endpoint for the Azure Container Registry instance.
*
* @param endpoint The URL of the Container Registry instance.
- * @return The updated {@link ContainerRegistryBlobClientBuilder} object.
+ * @return The updated {@link ContainerRegistryContentClientBuilder} object.
* @throws IllegalArgumentException If {@code endpoint} is null or it cannot be parsed into a valid URL.
*/
@Override
- public ContainerRegistryBlobClientBuilder endpoint(String endpoint) {
+ public ContainerRegistryContentClientBuilder endpoint(String endpoint) {
try {
new URL(endpoint);
} catch (MalformedURLException ex) {
@@ -100,9 +99,9 @@ public ContainerRegistryBlobClientBuilder endpoint(String endpoint) {
* Sets the repository name for the Azure Container Registry Blob instance.
*
* @param repositoryName The URL of the Container Registry instance.
- * @return The updated {@link ContainerRegistryBlobClientBuilder} object.
+ * @return The updated {@link ContainerRegistryContentClientBuilder} object.
*/
- public ContainerRegistryBlobClientBuilder repository(String repositoryName) {
+ public ContainerRegistryContentClientBuilder repositoryName(String repositoryName) {
this.repositoryName = repositoryName;
return this;
}
@@ -111,9 +110,9 @@ public ContainerRegistryBlobClientBuilder repository(String repositoryName) {
* Sets the audience for the Azure Container Registry service.
*
* @param audience ARM management scope associated with the given registry.
- * @return The updated {@link ContainerRegistryBlobClientBuilder} object.
+ * @return The updated {@link ContainerRegistryContentClientBuilder} object.
*/
- public ContainerRegistryBlobClientBuilder audience(ContainerRegistryAudience audience) {
+ public ContainerRegistryContentClientBuilder audience(ContainerRegistryAudience audience) {
this.audience = audience;
return this;
}
@@ -124,10 +123,10 @@ public ContainerRegistryBlobClientBuilder audience(ContainerRegistryAudience aud
* documentation for more details on proper usage of the {@link TokenCredential} type.
*
* @param credential {@link TokenCredential} used to authorize requests sent to the service.
- * @return The updated {@link ContainerRegistryBlobClientBuilder} object.
+ * @return The updated {@link ContainerRegistryContentClientBuilder} object.
*/
@Override
- public ContainerRegistryBlobClientBuilder credential(TokenCredential credential) {
+ public ContainerRegistryContentClientBuilder credential(TokenCredential credential) {
this.credential = credential;
return this;
}
@@ -143,7 +142,7 @@ public ContainerRegistryBlobClientBuilder credential(TokenCredential credential)
* documentation of types that implement this trait to understand the full set of implications.
*
* If {@code pipeline} is set, all settings other than {@link #endpoint(String) endpoint} are ignored
- * to build {@link ContainerRegistryBlobClient} or {@link ContainerRegistryBlobAsyncClient}.
+ * to build {@link ContainerRegistryContentClient} or {@link ContainerRegistryContentAsyncClient}.
*
*
* This service takes dependency on an internal policy which converts Azure token credentials into Azure Container Registry specific service credentials.
@@ -152,10 +151,10 @@ public ContainerRegistryBlobClientBuilder credential(TokenCredential credential)
* {For more information please see Azure Container Registry Authentication }.
*
* @param httpPipeline {@link HttpPipeline} to use for sending service requests and receiving responses.
- * @return The updated {@link ContainerRegistryBlobClientBuilder} object.
+ * @return The updated {@link ContainerRegistryContentClientBuilder} object.
*/
@Override
- public ContainerRegistryBlobClientBuilder pipeline(HttpPipeline httpPipeline) {
+ public ContainerRegistryContentClientBuilder pipeline(HttpPipeline httpPipeline) {
if (this.httpPipeline != null && httpPipeline == null) {
LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured.");
}
@@ -170,9 +169,9 @@ public ContainerRegistryBlobClientBuilder pipeline(HttpPipeline httpPipeline) {
* newer version of the client library may result in moving to a newer service version.
*
* @param version {@link ContainerRegistryServiceVersion} of the service to be used when making requests.
- * @return The updated {@link ContainerRegistryBlobClientBuilder} object.
+ * @return The updated {@link ContainerRegistryContentClientBuilder} object.
*/
- public ContainerRegistryBlobClientBuilder serviceVersion(ContainerRegistryServiceVersion version) {
+ public ContainerRegistryContentClientBuilder serviceVersion(ContainerRegistryServiceVersion version) {
this.version = version;
return this;
}
@@ -188,10 +187,10 @@ public ContainerRegistryBlobClientBuilder serviceVersion(ContainerRegistryServic
* 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 {@link ContainerRegistryBlobClientBuilder} object.
+ * @return The updated {@link ContainerRegistryContentClientBuilder} object.
*/
@Override
- public ContainerRegistryBlobClientBuilder httpClient(HttpClient httpClient) {
+ public ContainerRegistryContentClientBuilder httpClient(HttpClient httpClient) {
if (this.httpClient != null && httpClient == null) {
LOGGER.info("HttpClient is being set to 'null' when it was previously configured.");
}
@@ -215,11 +214,11 @@ public ContainerRegistryBlobClientBuilder httpClient(HttpClient httpClient) {
*
* @param clientOptions A configured instance of {@link HttpClientOptions}.
*
- * @return the updated {@link ContainerRegistryBlobClientBuilder} object
+ * @return the updated {@link ContainerRegistryContentClientBuilder} object
* @see HttpClientOptions
*/
@Override
- public ContainerRegistryBlobClientBuilder clientOptions(ClientOptions clientOptions) {
+ public ContainerRegistryContentClientBuilder clientOptions(ClientOptions clientOptions) {
this.clientOptions = clientOptions;
return this;
}
@@ -231,10 +230,10 @@ public ContainerRegistryBlobClientBuilder clientOptions(ClientOptions clientOpti
* configuration store}, use {@link Configuration#NONE} to bypass using configuration settings during construction.
*
* @param configuration The configuration store to be used.
- * @return The updated {@link ContainerRegistryBlobClientBuilder} object.
+ * @return The updated {@link ContainerRegistryContentClientBuilder} object.
*/
@Override
- public ContainerRegistryBlobClientBuilder configuration(Configuration configuration) {
+ public ContainerRegistryContentClientBuilder configuration(Configuration configuration) {
this.configuration = configuration;
return this;
}
@@ -252,10 +251,10 @@ public ContainerRegistryBlobClientBuilder configuration(Configuration configurat
*
* @param httpLogOptions The {@link HttpLogOptions logging configuration} to use when sending and receiving requests
* to and from the service.
- * @return The updated {@link ContainerRegistryBlobClientBuilder} object.
+ * @return The updated {@link ContainerRegistryContentClientBuilder} object.
*/
@Override
- public ContainerRegistryBlobClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) {
+ public ContainerRegistryContentClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) {
this.httpLogOptions = httpLogOptions;
return this;
}
@@ -264,14 +263,14 @@ public ContainerRegistryBlobClientBuilder httpLogOptions(HttpLogOptions httpLogO
* Sets the {@link HttpPipelinePolicy} that is used to retry requests.
*
* The default retry policy will be used if not provided {@link #buildAsyncClient()} to
- * build {@link ContainerRegistryBlobAsyncClient}.
+ * build {@link ContainerRegistryContentAsyncClient}.
*
* @param retryPolicy The {@link HttpPipelinePolicy} that will be used to retry requests. For example,
* {@link RetryPolicy} can be used to retry requests.
*
- * @return The updated ContainerRegistryBlobClientBuilder object.
+ * @return The updated ContainerRegistryContentClientBuilder object.
*/
- public ContainerRegistryBlobClientBuilder retryPolicy(RetryPolicy retryPolicy) {
+ public ContainerRegistryContentClientBuilder retryPolicy(RetryPolicy retryPolicy) {
this.retryPolicy = retryPolicy;
return this;
}
@@ -290,10 +289,10 @@ public ContainerRegistryBlobClientBuilder retryPolicy(RetryPolicy retryPolicy) {
*
* @param retryOptions The {@link RetryOptions} to use for all the requests made through the client.
*
- * @return The updated ContainerRegistryBlobClientBuilder object.
+ * @return The updated ContainerRegistryContentClientBuilder object.
*/
@Override
- public ContainerRegistryBlobClientBuilder retryOptions(RetryOptions retryOptions) {
+ public ContainerRegistryContentClientBuilder retryOptions(RetryOptions retryOptions) {
this.retryOptions = retryOptions;
return this;
}
@@ -309,11 +308,11 @@ public ContainerRegistryBlobClientBuilder retryOptions(RetryOptions retryOptions
* documentation of types that implement this trait to understand the full set of implications.
*
* @param policy A {@link HttpPipelinePolicy pipeline policy}.
- * @return The updated ContainerRegistryBlobClientBuilder object.
+ * @return The updated ContainerRegistryContentClientBuilder object.
* @throws NullPointerException If {@code policy} is null.
*/
@Override
- public ContainerRegistryBlobClientBuilder addPolicy(HttpPipelinePolicy policy) {
+ public ContainerRegistryContentClientBuilder addPolicy(HttpPipelinePolicy policy) {
Objects.requireNonNull(policy, "'policy' cannot be null.");
if (policy.getPipelinePosition() == HttpPipelinePosition.PER_CALL) {
@@ -326,17 +325,17 @@ public ContainerRegistryBlobClientBuilder addPolicy(HttpPipelinePolicy policy) {
}
/**
- * Creates a {@link ContainerRegistryBlobAsyncClient} based on options set in the Builder. Every time {@code
- * buildAsyncClient()} is called a new instance of {@link ContainerRegistryBlobAsyncClient} is created.
+ * Creates a {@link ContainerRegistryContentAsyncClient} based on options set in the Builder. Every time {@code
+ * buildAsyncClient()} is called a new instance of {@link ContainerRegistryContentAsyncClient} is created.
*
* If {@link #pipeline(HttpPipeline)} pipeline} is set, then the {@code pipeline} and {@link #endpoint(String) endpoint}
- * are used to create the {@link ContainerRegistryBlobAsyncClient client}. All other builder settings are ignored.
+ * are used to create the {@link ContainerRegistryContentAsyncClient client}. All other builder settings are ignored.
*
- * @return A {@link ContainerRegistryBlobAsyncClient} with the options set from the builder.
+ * @return A {@link ContainerRegistryContentAsyncClient} with the options set from the builder.
* @throws NullPointerException If {@code endpoint} is null.
* You can set the values by calling {@link #endpoint(String)} and {@link #audience(ContainerRegistryAudience)} respectively.
*/
- public ContainerRegistryBlobAsyncClient buildAsyncClient() {
+ public ContainerRegistryContentAsyncClient buildAsyncClient() {
Objects.requireNonNull(endpoint, "'endpoint' can't be null");
// Service version
@@ -347,22 +346,22 @@ public ContainerRegistryBlobAsyncClient buildAsyncClient() {
Tracer tracer = createTracer(clientOptions);
HttpPipeline pipeline = getHttpPipeline(tracer);
- ContainerRegistryBlobAsyncClient client = new ContainerRegistryBlobAsyncClient(repositoryName, pipeline, endpoint, serviceVersion.getVersion(), tracer);
+ ContainerRegistryContentAsyncClient client = new ContainerRegistryContentAsyncClient(repositoryName, pipeline, endpoint, serviceVersion.getVersion(), tracer);
return client;
}
/**
- * Creates a {@link ContainerRegistryBlobClient} based on options set in the Builder. Every time {@code
- * buildAsyncClient()} is called a new instance of {@link ContainerRegistryBlobClient} is created.
+ * Creates a {@link ContainerRegistryContentClient} based on options set in the Builder. Every time {@code
+ * buildAsyncClient()} is called a new instance of {@link ContainerRegistryContentClient} is created.
*
* If {@link #pipeline(HttpPipeline)} pipeline} is set, then the {@code pipeline} and {@link #endpoint(String) endpoint}
- * are used to create the {@link ContainerRegistryBlobClient client}. All other builder settings are ignored.
+ * are used to create the {@link ContainerRegistryContentClient client}. All other builder settings are ignored.
*
- * @return A {@link ContainerRegistryBlobClient} with the options set from the builder.
+ * @return A {@link ContainerRegistryContentClient} with the options set from the builder.
* @throws NullPointerException If {@code endpoint} or {@code audience} is null.
* You can set the values by calling {@link #endpoint(String)} and {@link #audience(ContainerRegistryAudience)} respectively.
*/
- public ContainerRegistryBlobClient buildClient() {
+ public ContainerRegistryContentClient buildClient() {
Objects.requireNonNull(endpoint, "'endpoint' can't be null");
// Service version
@@ -371,7 +370,7 @@ public ContainerRegistryBlobClient buildClient() {
: ContainerRegistryServiceVersion.getLatest();
Tracer tracer = createTracer(clientOptions);
- return new ContainerRegistryBlobClient(repositoryName, getHttpPipeline(tracer), endpoint, serviceVersion.getVersion(), tracer);
+ return new ContainerRegistryContentClient(repositoryName, getHttpPipeline(tracer), endpoint, serviceVersion.getVersion(), tracer);
}
private HttpPipeline getHttpPipeline(Tracer tracer) {
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/AuthenticationsImpl.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/AuthenticationsImpl.java
index c646fa4de2c96..8fb7a65ed2a7c 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/AuthenticationsImpl.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/AuthenticationsImpl.java
@@ -11,7 +11,6 @@
import com.azure.containers.containerregistry.implementation.models.TokenGrantType;
import com.azure.core.annotation.ExpectedResponses;
import com.azure.core.annotation.FormParam;
-import com.azure.core.annotation.Get;
import com.azure.core.annotation.HeaderParam;
import com.azure.core.annotation.Host;
import com.azure.core.annotation.HostParam;
@@ -110,26 +109,6 @@ Response exchangeAcrRefreshTokenForAcrAccessTokenSync(
@FormParam("grant_type") TokenGrantType grantType,
@HeaderParam("Accept") String accept,
Context context);
-
- @Get("/oauth2/token")
- @ExpectedResponses({200})
- @UnexpectedResponseExceptionType(AcrErrorsException.class)
- Mono> getAcrAccessTokenFromLogin(
- @HostParam("url") String url,
- @QueryParam("service") String service,
- @QueryParam("scope") String scope,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Get("/oauth2/token")
- @ExpectedResponses({200})
- @UnexpectedResponseExceptionType(AcrErrorsException.class)
- Response getAcrAccessTokenFromLoginSync(
- @HostParam("url") String url,
- @QueryParam("service") String service,
- @QueryParam("scope") String scope,
- @HeaderParam("Accept") String accept,
- Context context);
}
/**
@@ -464,113 +443,4 @@ public AcrAccessToken exchangeAcrRefreshTokenForAcrAccessToken(
serviceParam, scope, refreshToken, grantType, Context.NONE)
.getValue();
}
-
- /**
- * Exchange Username, Password and Scope for an ACR Access Token.
- *
- * @param serviceParam Indicates the name of your Azure container registry.
- * @param scope Expected to be a valid scope, and can be specified more than once for multiple scope requests. You
- * can obtain this from the Www-Authenticate response header from the challenge.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws AcrErrorsException thrown 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> getAcrAccessTokenFromLoginWithResponseAsync(
- String serviceParam, String scope) {
- final String accept = "application/json";
- return FluxUtil.withContext(
- context ->
- service.getAcrAccessTokenFromLogin(this.client.getUrl(), serviceParam, scope, accept, context));
- }
-
- /**
- * Exchange Username, Password and Scope for an ACR Access Token.
- *
- * @param serviceParam Indicates the name of your Azure container registry.
- * @param scope Expected to be a valid scope, and can be specified more than once for multiple scope requests. You
- * can obtain this from the Www-Authenticate response header from the challenge.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws AcrErrorsException thrown 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> getAcrAccessTokenFromLoginWithResponseAsync(
- String serviceParam, String scope, Context context) {
- final String accept = "application/json";
- return service.getAcrAccessTokenFromLogin(this.client.getUrl(), serviceParam, scope, accept, context);
- }
-
- /**
- * Exchange Username, Password and Scope for an ACR Access Token.
- *
- * @param serviceParam Indicates the name of your Azure container registry.
- * @param scope Expected to be a valid scope, and can be specified more than once for multiple scope requests. You
- * can obtain this from the Www-Authenticate response header from the challenge.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws AcrErrorsException thrown 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 getAcrAccessTokenFromLoginAsync(String serviceParam, String scope) {
- return getAcrAccessTokenFromLoginWithResponseAsync(serviceParam, scope)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
- }
-
- /**
- * Exchange Username, Password and Scope for an ACR Access Token.
- *
- * @param serviceParam Indicates the name of your Azure container registry.
- * @param scope Expected to be a valid scope, and can be specified more than once for multiple scope requests. You
- * can obtain this from the Www-Authenticate response header from the challenge.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws AcrErrorsException thrown 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 getAcrAccessTokenFromLoginAsync(String serviceParam, String scope, Context context) {
- return getAcrAccessTokenFromLoginWithResponseAsync(serviceParam, scope, context)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
- }
-
- /**
- * Exchange Username, Password and Scope for an ACR Access Token.
- *
- * @param serviceParam Indicates the name of your Azure container registry.
- * @param scope Expected to be a valid scope, and can be specified more than once for multiple scope requests. You
- * can obtain this from the Www-Authenticate response header from the challenge.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws AcrErrorsException thrown 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 getAcrAccessTokenFromLoginWithResponse(
- String serviceParam, String scope, Context context) {
- final String accept = "application/json";
- return service.getAcrAccessTokenFromLoginSync(this.client.getUrl(), serviceParam, scope, accept, context);
- }
-
- /**
- * Exchange Username, Password and Scope for an ACR Access Token.
- *
- * @param serviceParam Indicates the name of your Azure container registry.
- * @param scope Expected to be a valid scope, and can be specified more than once for multiple scope requests. You
- * can obtain this from the Www-Authenticate response header from the challenge.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws AcrErrorsException thrown 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 AcrAccessToken getAcrAccessTokenFromLogin(String serviceParam, String scope) {
- return getAcrAccessTokenFromLoginWithResponse(serviceParam, scope, Context.NONE).getValue();
- }
}
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/ConstructorAccessors.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/ConstructorAccessors.java
index 3b628eaeb5fc3..4353381373802 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/ConstructorAccessors.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/ConstructorAccessors.java
@@ -4,87 +4,62 @@
package com.azure.containers.containerregistry.implementation;
-import com.azure.containers.containerregistry.models.DownloadBlobAsyncResult;
-import com.azure.containers.containerregistry.models.DownloadManifestResult;
+import com.azure.containers.containerregistry.models.GetManifestResult;
import com.azure.containers.containerregistry.models.ManifestMediaType;
+import com.azure.containers.containerregistry.models.UploadRegistryBlobResult;
+import com.azure.containers.containerregistry.models.SetManifestResult;
import com.azure.core.util.BinaryData;
-import com.azure.containers.containerregistry.models.UploadBlobResult;
-import com.azure.containers.containerregistry.models.UploadManifestResult;
import com.azure.core.util.logging.ClientLogger;
-import reactor.core.publisher.Flux;
-
-import java.nio.ByteBuffer;
public final class ConstructorAccessors {
private static final ClientLogger LOGGER = new ClientLogger(ConstructorAccessors.class);
- private static DownloadBlobAsyncResultConstructorAccessor downloadBlobAccessor;
- private static DownloadManifestResultConstructorAccessor downloadManifestAccessor;
-
- private static UploadBlobResultConstructorAccessor uploadBlobResultAccessor;
- private static UploadManifestResultConstructorAccessor uploadManifestResultAccessor;
- public interface DownloadBlobAsyncResultConstructorAccessor {
- DownloadBlobAsyncResult create(String digest, Flux content);
- }
+ private static GetManifestResultConstructorAccessor getManifestAccessor;
- public interface DownloadManifestResultConstructorAccessor {
- DownloadManifestResult create(String digest, ManifestMediaType mediaType, BinaryData rawData);
- }
+ private static UploadRegistryBlobResultConstructorAccessor uploadBlobResultAccessor;
+ private static SetManifestResultConstructorAccessor setManifestResultAccessor;
- public interface UploadManifestResultConstructorAccessor {
- UploadManifestResult create(String digest);
+ public interface GetManifestResultConstructorAccessor {
+ GetManifestResult create(String digest, ManifestMediaType mediaType, BinaryData rawData);
}
- public interface UploadBlobResultConstructorAccessor {
- UploadBlobResult create(String digest, long length);
+ public interface SetManifestResultConstructorAccessor {
+ SetManifestResult create(String digest);
}
- public static void setDownloadBlobResultAccessor(final DownloadBlobAsyncResultConstructorAccessor accessor) {
- downloadBlobAccessor = accessor;
+ public interface UploadRegistryBlobResultConstructorAccessor {
+ UploadRegistryBlobResult create(String digest, long length);
}
- public static void setDownloadManifestResultAccessor(final DownloadManifestResultConstructorAccessor accessor) {
- downloadManifestAccessor = accessor;
+ public static void setGetManifestResultAccessor(final GetManifestResultConstructorAccessor accessor) {
+ getManifestAccessor = accessor;
}
- public static void setUploadBlobResultAccessor(final UploadBlobResultConstructorAccessor accessor) {
+ public static void setUploadRegistryBlobResultAccessor(final UploadRegistryBlobResultConstructorAccessor accessor) {
uploadBlobResultAccessor = accessor;
}
- public static void setUploadManifestResultAccessor(final UploadManifestResultConstructorAccessor accessor) {
- uploadManifestResultAccessor = accessor;
- }
-
- public static DownloadBlobAsyncResult createDownloadBlobResult(String digest, Flux content) {
- if (downloadBlobAccessor == null) {
- try {
- // it's possible that nobody yet created BlobDownloadAsyncResult, so we'll need to force its static section to run and set accessor.
- Class.forName(DownloadBlobAsyncResult.class.getName(), true, DownloadBlobAsyncResultConstructorAccessor.class.getClassLoader());
- } catch (ClassNotFoundException e) {
- throw LOGGER.logExceptionAsError(new RuntimeException(e));
- }
- }
- assert downloadBlobAccessor != null;
- return downloadBlobAccessor.create(digest, content);
+ public static void setSetManifestResultAccessor(final SetManifestResultConstructorAccessor accessor) {
+ setManifestResultAccessor = accessor;
}
- public static DownloadManifestResult createDownloadManifestResult(String digest, ManifestMediaType mediaType, BinaryData rawData) {
- if (downloadManifestAccessor == null) {
+ public static GetManifestResult createGetManifestResult(String digest, ManifestMediaType mediaType, BinaryData rawData) {
+ if (getManifestAccessor == null) {
try {
// it's possible that nobody yet created DownloadBlobAsyncResult, so we'll need to force its static section to run and set accessor.
- Class.forName(DownloadManifestResult.class.getName(), true, DownloadManifestResultConstructorAccessor.class.getClassLoader());
+ Class.forName(GetManifestResult.class.getName(), true, GetManifestResultConstructorAccessor.class.getClassLoader());
} catch (ClassNotFoundException e) {
throw LOGGER.logExceptionAsError(new RuntimeException(e));
}
}
- assert downloadManifestAccessor != null;
- return downloadManifestAccessor.create(digest, mediaType, rawData);
+ assert getManifestAccessor != null;
+ return getManifestAccessor.create(digest, mediaType, rawData);
}
- public static UploadBlobResult createUploadBlobResult(String digest, long length) {
+ public static UploadRegistryBlobResult createUploadRegistryBlobResult(String digest, long length) {
if (uploadBlobResultAccessor == null) {
try {
// it's possible that nobody yet created BlobDownloadAsyncResult, so we'll need to force its static section to run and set accessor.
- Class.forName(UploadBlobResult.class.getName(), true, UploadBlobResultConstructorAccessor.class.getClassLoader());
+ Class.forName(UploadRegistryBlobResult.class.getName(), true, UploadRegistryBlobResultConstructorAccessor.class.getClassLoader());
} catch (ClassNotFoundException e) {
throw LOGGER.logExceptionAsError(new RuntimeException(e));
}
@@ -93,16 +68,16 @@ public static UploadBlobResult createUploadBlobResult(String digest, long length
return uploadBlobResultAccessor.create(digest, length);
}
- public static UploadManifestResult createUploadManifestResult(String digest) {
- if (uploadManifestResultAccessor == null) {
+ public static SetManifestResult createSetManifestResult(String digest) {
+ if (setManifestResultAccessor == null) {
try {
// it's possible that nobody yet created BlobDownloadAsyncResult, so we'll need to force its static section to run and set accessor.
- Class.forName(UploadManifestResult.class.getName(), true, UploadManifestResultConstructorAccessor.class.getClassLoader());
+ Class.forName(SetManifestResult.class.getName(), true, SetManifestResultConstructorAccessor.class.getClassLoader());
} catch (ClassNotFoundException e) {
throw LOGGER.logExceptionAsError(new RuntimeException(e));
}
}
- assert uploadManifestResultAccessor != null;
- return uploadManifestResultAccessor.create(digest);
+ assert setManifestResultAccessor != null;
+ return setManifestResultAccessor.create(digest);
}
}
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/UtilsImpl.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/UtilsImpl.java
index a87251b2d29a3..55c4c87ca79ff 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/UtilsImpl.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/UtilsImpl.java
@@ -13,7 +13,7 @@
import com.azure.containers.containerregistry.models.ArtifactManifestProperties;
import com.azure.containers.containerregistry.models.ArtifactTagProperties;
import com.azure.containers.containerregistry.models.ContainerRegistryAudience;
-import com.azure.containers.containerregistry.models.DownloadManifestResult;
+import com.azure.containers.containerregistry.models.GetManifestResult;
import com.azure.containers.containerregistry.models.ManifestMediaType;
import com.azure.core.credential.TokenCredential;
import com.azure.core.exception.ClientAuthenticationException;
@@ -60,12 +60,10 @@
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.Function;
-import java.util.stream.Collectors;
import static com.azure.core.util.CoreUtils.bytesToHexString;
@@ -82,12 +80,18 @@ public final class UtilsImpl {
private static final int HTTP_STATUS_CODE_ACCEPTED = 202;
public static final HttpHeaderName DOCKER_DIGEST_HEADER_NAME = HttpHeaderName.fromString("docker-content-digest");
- // TODO (limolkova) should we send index and list too so that we won't need to change the default later on?
- public static final String SUPPORTED_MANIFEST_TYPES = ManifestMediaType.OCI_MANIFEST + "," + ManifestMediaType.DOCKER_MANIFEST;
+
+ public static final String SUPPORTED_MANIFEST_TYPES = "*/*"
+ + "," + ManifestMediaType.OCI_MANIFEST
+ + "," + ManifestMediaType.DOCKER_MANIFEST
+ + ",application/vnd.oci.image.index.v1+json"
+ + ",application/vnd.docker.distribution.manifest.list.v2+json"
+ + ",application/vnd.cncf.oras.artifact.manifest.v1+json";
+
private static final String CONTAINER_REGISTRY_TRACING_NAMESPACE_VALUE = "Microsoft.ContainerRegistry";
public static final int CHUNK_SIZE = 4 * 1024 * 1024;
- public static final String UPLOAD_BLOB_SPAN_NAME = "ContainerRegistryBlobAsyncClient.uploadBlob";
- public static final String DOWNLOAD_BLOB_SPAN_NAME = "ContainerRegistryBlobAsyncClient.downloadBlob";
+ public static final String UPLOAD_BLOB_SPAN_NAME = "ContainerRegistryContentAsyncClient.uploadBlob";
+ public static final String DOWNLOAD_BLOB_SPAN_NAME = "ContainerRegistryContentAsyncClient.downloadBlob";
private UtilsImpl() { }
@@ -223,7 +227,7 @@ public static void validateDigest(MessageDigest messageDigest, String requestedD
}
}
- public static Response toDownloadManifestResponse(String tagOrDigest, Response rawResponse) {
+ public static Response toGetManifestResponse(String tagOrDigest, Response rawResponse) {
String digest = rawResponse.getHeaders().getValue(DOCKER_DIGEST_HEADER_NAME);
String responseSha256 = computeDigest(rawResponse.getValue().toByteBuffer());
@@ -239,7 +243,7 @@ public static Response toDownloadManifestResponse(String
rawResponse.getRequest(),
rawResponse.getStatusCode(),
rawResponse.getHeaders(),
- ConstructorAccessors.createDownloadManifestResult(digest, responseMediaType, rawResponse.getValue()));
+ ConstructorAccessors.createGetManifestResult(digest, responseMediaType, rawResponse.getValue()));
}
/**
@@ -477,12 +481,4 @@ public static String formatFullyQualifiedReference(String endpoint, String repos
throw LOGGER.logExceptionAsWarning(new IllegalArgumentException("'endpoint' must be a valid URL", ex));
}
}
-
- public static String getContentTypeString(Collection mediaTypes) {
- return CoreUtils.isNullOrEmpty(mediaTypes)
- ? SUPPORTED_MANIFEST_TYPES
- : mediaTypes.stream()
- .map(String::valueOf)
- .collect(Collectors.joining(","));
- }
}
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/DownloadBlobAsyncResult.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/DownloadBlobAsyncResult.java
deleted file mode 100644
index bdaa364a9548d..0000000000000
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/DownloadBlobAsyncResult.java
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-package com.azure.containers.containerregistry.models;
-
-import com.azure.containers.containerregistry.implementation.ConstructorAccessors;
-import com.azure.containers.containerregistry.implementation.UtilsImpl;
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.FluxUtil;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-import java.io.UncheckedIOException;
-import java.nio.ByteBuffer;
-import java.nio.channels.AsynchronousByteChannel;
-import java.nio.channels.WritableByteChannel;
-import java.security.MessageDigest;
-import java.util.Objects;
-
-import static com.azure.containers.containerregistry.implementation.UtilsImpl.validateDigest;
-
-/**
- * The object returned by the downloadBlob operation
- * containing the blob contents and its digest.
- */
-@Fluent
-public final class DownloadBlobAsyncResult {
- static {
- ConstructorAccessors.setDownloadBlobResultAccessor(DownloadBlobAsyncResult::new);
- }
-
- private final Flux content;
- private final MessageDigest sha256;
-
- /**
- * Initialize an instance of DownloadBlobResult.
- * @param digest The requested digest.
- * @param content The content of the blob.
- */
- private DownloadBlobAsyncResult(String digest, Flux content) {
- this.sha256 = UtilsImpl.createSha256();
- this.content = content
- .doOnNext(buffer -> sha256.update(buffer.asReadOnlyBuffer()))
- .doOnComplete(() -> validateDigest(sha256, digest))
- .doOnError(UtilsImpl::mapException);
- }
-
- /**
- * Get the blob contents.
- * @return The contents of the blob.
- */
- public Flux getValue() {
- return content;
- }
-
- /**
- * Transfers content bytes to the {@link AsynchronousByteChannel}.
- * @param channel The destination {@link AsynchronousByteChannel}.
- * @return A {@link Mono} that completes when transfer is completed.
- */
- public Mono writeValueToAsync(AsynchronousByteChannel channel) {
- Objects.requireNonNull(channel, "'channel' must not be null");
- return FluxUtil.writeToAsynchronousByteChannel(content, channel);
- }
-
- /**
- * Transfers content bytes to the {@link WritableByteChannel}.
- * @param channel The destination {@link WritableByteChannel}.
- * @return A {@link Mono} that completes when transfer is completed.
- * @throws UncheckedIOException When I/O operation fails.
- */
- public Mono writeValueTo(WritableByteChannel channel) {
- Objects.requireNonNull(channel, "'channel' must not be null");
- return FluxUtil.writeToWritableByteChannel(content, channel);
- }
-}
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/DownloadManifestResult.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/DownloadManifestResult.java
deleted file mode 100644
index 5b4900c357aea..0000000000000
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/DownloadManifestResult.java
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-package com.azure.containers.containerregistry.models;
-
-import com.azure.containers.containerregistry.implementation.ConstructorAccessors;
-import com.azure.core.util.BinaryData;
-import com.azure.core.util.logging.ClientLogger;
-
-/**
- * The result from downloading an OCI manifest from the registry.
- */
-public class DownloadManifestResult {
- private static final ClientLogger LOGGER = new ClientLogger(DownloadManifestResult.class);
- static {
- ConstructorAccessors.setDownloadManifestResultAccessor(DownloadManifestResult::new);
- }
-
- private final String digest;
- private OciImageManifest ociManifest;
- private final ManifestMediaType mediaType;
- private final BinaryData rawData;
-
- DownloadManifestResult(String digest, ManifestMediaType mediaType, BinaryData rawData) {
- this.digest = digest;
- this.mediaType = mediaType;
- this.rawData = rawData;
- }
-
- /**
- * The manifest's digest, calculated by the registry.
- * @return The digest.
- */
- public String getDigest() {
- return this.digest;
- }
-
- /**
- * The OCI manifest that was downloaded.
- * @return The {@link OciImageManifest} instance.
- * @throws IllegalStateException thrown when attempting to get {@link OciImageManifest} from incompatible media type.
- */
- public OciImageManifest asOciManifest() {
- if (ociManifest != null) {
- return ociManifest;
- }
-
- if (!ManifestMediaType.DOCKER_MANIFEST.equals(mediaType)
- && !ManifestMediaType.OCI_MANIFEST.equals(mediaType)) {
- throw LOGGER.logExceptionAsError(new IllegalStateException(
- String.format("Cannot convert manifest with %s media type to OciImageManifest", mediaType)));
- }
-
- ociManifest = rawData.toObject(OciImageManifest.class);
-
- return ociManifest;
- }
-
- /**
- * The manifest stream that was downloaded.
- * @return The associated manifest stream.
- */
- public BinaryData getContent() {
- return this.rawData;
- }
-
- /**
- * Get manifest media type.
- * @return Instance of {@link ManifestMediaType}
- */
- public ManifestMediaType getMediaType() {
- return mediaType;
- }
-}
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/GetManifestResult.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/GetManifestResult.java
new file mode 100644
index 0000000000000..6a3fc4471d014
--- /dev/null
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/GetManifestResult.java
@@ -0,0 +1,49 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+package com.azure.containers.containerregistry.models;
+
+import com.azure.containers.containerregistry.implementation.ConstructorAccessors;
+import com.azure.core.util.BinaryData;
+
+/**
+ * The result of getting a manifest from the registry.
+ */
+public final class GetManifestResult {
+ static {
+ ConstructorAccessors.setGetManifestResultAccessor(GetManifestResult::new);
+ }
+
+ private final String digest;
+ private final ManifestMediaType mediaType;
+ private final BinaryData rawData;
+
+ GetManifestResult(String digest, ManifestMediaType mediaType, BinaryData rawData) {
+ this.digest = digest;
+ this.mediaType = mediaType;
+ this.rawData = rawData;
+ }
+
+ /**
+ * The manifest's digest, calculated by the registry.
+ * @return The digest.
+ */
+ public String getDigest() {
+ return this.digest;
+ }
+
+ /**
+ * The manifest content retrieved from the service.
+ * @return The associated manifest content.
+ */
+ public BinaryData getManifest() {
+ return this.rawData;
+ }
+
+ /**
+ * Get manifest media type.
+ * @return Instance of {@link ManifestMediaType}
+ */
+ public ManifestMediaType getManifestMediaType() {
+ return mediaType;
+ }
+}
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/ManifestMediaType.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/ManifestMediaType.java
index 3eddc79dd7178..4cff5f3df6340 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/ManifestMediaType.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/ManifestMediaType.java
@@ -8,7 +8,7 @@
/**
* Manifest media type.
*/
-public class ManifestMediaType extends ExpandableStringEnum {
+public final class ManifestMediaType extends ExpandableStringEnum {
/**
* Docker v2 manifest content type.
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/OciAnnotations.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/OciAnnotations.java
index e806d04db3c18..06ea71e32df20 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/OciAnnotations.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/OciAnnotations.java
@@ -22,7 +22,7 @@ public final class OciAnnotations implements JsonSerializable {
* Date and time on which the image was built (string, date-time as defined by
* https://tools.ietf.org/html/rfc3339#section-5.6)
*/
- private OffsetDateTime created;
+ private OffsetDateTime createdOn;
/*
* Contact details of the people or organization responsible for the image.
@@ -89,24 +89,24 @@ public final class OciAnnotations implements JsonSerializable {
public OciAnnotations() {}
/**
- * Get the created property: Date and time on which the image was built (string, date-time as defined by
+ * Get the createdOn property: Date and time on which the image was built (string, date-time as defined by
* https://tools.ietf.org/html/rfc3339#section-5.6).
*
- * @return the created value.
+ * @return the createdOn value.
*/
- public OffsetDateTime getCreated() {
- return this.created;
+ public OffsetDateTime getCreatedOn() {
+ return this.createdOn;
}
/**
- * Set the created property: Date and time on which the image was built (string, date-time as defined by
+ * Set the createdOn property: Date and time on which the image was built (string, date-time as defined by
* https://tools.ietf.org/html/rfc3339#section-5.6).
*
- * @param created the created value to set.
+ * @param createdOn the createdOn value to set.
* @return the OciAnnotations object itself.
*/
- public OciAnnotations setCreated(OffsetDateTime created) {
- this.created = created;
+ public OciAnnotations setCreatedOn(OffsetDateTime createdOn) {
+ this.createdOn = createdOn;
return this;
}
@@ -357,7 +357,7 @@ public OciAnnotations setAdditionalProperties(Map additionalProp
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
- jsonWriter.writeStringField("org.opencontainers.image.created", Objects.toString(this.created, null));
+ jsonWriter.writeStringField("org.opencontainers.image.created", Objects.toString(this.createdOn, null));
jsonWriter.writeStringField("org.opencontainers.image.authors", this.authors);
jsonWriter.writeStringField("org.opencontainers.image.url", this.url);
jsonWriter.writeStringField("org.opencontainers.image.documentation", this.documentation);
@@ -395,7 +395,7 @@ public static OciAnnotations fromJson(JsonReader jsonReader) throws IOException
reader.nextToken();
if ("org.opencontainers.image.created".equals(fieldName)) {
- deserializedOciAnnotations.created =
+ deserializedOciAnnotations.createdOn =
reader.getNullable(
nonNullReader -> OffsetDateTime.parse(nonNullReader.getString()));
} else if ("org.opencontainers.image.authors".equals(fieldName)) {
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/OciImageManifest.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/OciImageManifest.java
index 730b0b377f70a..62ba18f71ac34 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/OciImageManifest.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/OciImageManifest.java
@@ -15,12 +15,10 @@
/** Returns the requested OCI Manifest file. */
@Fluent
public final class OciImageManifest implements JsonSerializable {
- // TODO (limolkova) should default value be auto-generated?
- private static final int DEFAULT_VERSION = 2;
/*
* V2 image config descriptor
*/
- private OciDescriptor config;
+ private OciDescriptor configuration;
/*
* List of V2 image layer information
@@ -35,28 +33,28 @@ public final class OciImageManifest implements JsonSerializable writer.writeJson(element));
jsonWriter.writeJsonField("annotations", this.annotations);
return jsonWriter.writeEndObject();
@@ -150,7 +148,7 @@ public static OciImageManifest fromJson(JsonReader jsonReader) throws IOExceptio
if ("schemaVersion".equals(fieldName)) {
deserializedOciImageManifest.schemaVersion = reader.getInt();
} else if ("config".equals(fieldName)) {
- deserializedOciImageManifest.config = OciDescriptor.fromJson(reader);
+ deserializedOciImageManifest.configuration = OciDescriptor.fromJson(reader);
} else if ("layers".equals(fieldName)) {
List layers = reader.readArray(reader1 -> OciDescriptor.fromJson(reader1));
deserializedOciImageManifest.layers = layers;
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/UploadManifestOptions.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/SetManifestOptions.java
similarity index 57%
rename from sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/UploadManifestOptions.java
rename to sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/SetManifestOptions.java
index 1798aa031a13a..bf4a1a10e140a 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/UploadManifestOptions.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/SetManifestOptions.java
@@ -8,29 +8,29 @@
import java.util.Objects;
/**
- * Options for configuring the upload manifest operation.
+ * Set manifest options.
*/
-public final class UploadManifestOptions {
+public final class SetManifestOptions {
private final ManifestMediaType mediaType;
private final BinaryData manifest;
private String tag;
/**
- * Instantiate an instance of upload manifest options with the ocimanifest information.
- * @param ociManifest The Oci manifest.
+ * Creates new instance of {@link SetManifestOptions}
+ * @param ociImageManifest Instance of {@link OciImageManifest} to be set on the service.
*/
- public UploadManifestOptions(OciImageManifest ociManifest) {
- Objects.requireNonNull(ociManifest, "'ociManifest' can't be null.");
- this.manifest = BinaryData.fromObject(ociManifest);
+ public SetManifestOptions(OciImageManifest ociImageManifest) {
+ Objects.requireNonNull(ociImageManifest, "'ociManifest' can't be null.");
+ this.manifest = BinaryData.fromObject(ociImageManifest);
this.mediaType = ManifestMediaType.OCI_MANIFEST;
}
/**
- * Instantiate an instance of upload manifest options with the manifest information.
- * @param manifest The manifest that needs to be uploaded.
+ * Creates new instance of {@link SetManifestOptions}
+ * @param manifest The manifest to set.
* @param manifestMediaType The media type of supplied manifest.
*/
- public UploadManifestOptions(BinaryData manifest, ManifestMediaType manifestMediaType) {
+ public SetManifestOptions(BinaryData manifest, ManifestMediaType manifestMediaType) {
Objects.requireNonNull(manifest, "'manifest' can't be null.");
Objects.requireNonNull(manifestMediaType, "'manifestMediaType' can't be null.");
this.manifest = manifest;
@@ -39,10 +39,10 @@ public UploadManifestOptions(BinaryData manifest, ManifestMediaType manifestMedi
/**
* A tag to assign to the artifact represented by this manifest.
- * @param tag The tag of the manifest.
- * @return The UploadManifestOptions object.
+ * @param tag Tag to be set on the manifest when sending it.
+ * @return The {@link SetManifestOptions} object for chaining.
*/
- public UploadManifestOptions setTag(String tag) {
+ public SetManifestOptions setTag(String tag) {
this.tag = tag;
return this;
}
@@ -56,8 +56,8 @@ public String getTag() {
}
/**
- * The manifest to be uploaded.
- * @return The BinaryData representing the manifest.
+ * The manifest to be sent to the service.
+ * @return The {@link BinaryData} representing the manifest.
*/
public BinaryData getManifest() {
return this.manifest;
@@ -67,7 +67,7 @@ public BinaryData getManifest() {
* Media type of the corresponding manifest.
* @return instance of {@link ManifestMediaType}.
*/
- public ManifestMediaType getMediaType() {
+ public ManifestMediaType getManifestMediaType() {
return mediaType;
}
}
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/UploadManifestResult.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/SetManifestResult.java
similarity index 51%
rename from sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/UploadManifestResult.java
rename to sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/SetManifestResult.java
index 337b48fd28854..63a5c3c83ec38 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/UploadManifestResult.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/SetManifestResult.java
@@ -6,24 +6,20 @@
import com.azure.containers.containerregistry.implementation.ConstructorAccessors;
/**
- * The result from uploading a manifest.
+ * The result from setting a manifest.
*/
-public final class UploadManifestResult {
+public final class SetManifestResult {
static {
- ConstructorAccessors.setUploadManifestResultAccessor(UploadManifestResult::new);
+ ConstructorAccessors.setSetManifestResultAccessor(SetManifestResult::new);
}
private final String digest;
- /**
- * Initializes upload manifest result object.
- * @param digest The digest associated with the manifest.
- */
- private UploadManifestResult(String digest) {
+ private SetManifestResult(String digest) {
this.digest = digest;
}
/**
- * Get the digest associated with the upload manifest operation.
+ * Get manifest digest.
* @return The digest.
*/
public String getDigest() {
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/UploadBlobResult.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/UploadRegistryBlobResult.java
similarity index 81%
rename from sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/UploadBlobResult.java
rename to sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/UploadRegistryBlobResult.java
index 2129c0812ae94..4208f203fb5ce 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/UploadBlobResult.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/models/UploadRegistryBlobResult.java
@@ -8,9 +8,9 @@
/**
* The result from uploading the blob.
*/
-public final class UploadBlobResult {
+public final class UploadRegistryBlobResult {
static {
- ConstructorAccessors.setUploadBlobResultAccessor(UploadBlobResult::new);
+ ConstructorAccessors.setUploadRegistryBlobResultAccessor(UploadRegistryBlobResult::new);
}
private final String digest;
@@ -20,7 +20,7 @@ public final class UploadBlobResult {
* Instantiate the upload blob result.
* @param digest The digest of the blob that was uploaded.
*/
- private UploadBlobResult(String digest, long length) {
+ private UploadRegistryBlobResult(String digest, long length) {
this.digest = digest;
this.length = length;
}
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/specialized/package-info.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/specialized/package-info.java
deleted file mode 100644
index 06ed2dd602e7c..0000000000000
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/specialized/package-info.java
+++ /dev/null
@@ -1,9 +0,0 @@
-// 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 AzureContainerRegistry. Metadata API definition for the Azure Container
- * Registry runtime.
- */
-package com.azure.containers.containerregistry.specialized;
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/module-info.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/module-info.java
index e2cd151f48a84..10d8b8c170c67 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/module-info.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/module-info.java
@@ -7,7 +7,6 @@
exports com.azure.containers.containerregistry;
exports com.azure.containers.containerregistry.models;
- exports com.azure.containers.containerregistry.specialized;
opens com.azure.containers.containerregistry.implementation to com.fasterxml.jackson.databind, com.azure.core;
opens com.azure.containers.containerregistry.implementation.models to com.fasterxml.jackson.databind, com.azure.core;
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/samples/java/com/azure/containers/containerregistry/DownloadImage.java b/sdk/containerregistry/azure-containers-containerregistry/src/samples/java/com/azure/containers/containerregistry/DownloadImage.java
index 04efada16465d..47b1b84dc1b91 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/samples/java/com/azure/containers/containerregistry/DownloadImage.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/samples/java/com/azure/containers/containerregistry/DownloadImage.java
@@ -3,12 +3,10 @@
package com.azure.containers.containerregistry;
-import com.azure.containers.containerregistry.models.DownloadManifestResult;
+import com.azure.containers.containerregistry.models.GetManifestResult;
import com.azure.containers.containerregistry.models.ManifestMediaType;
import com.azure.containers.containerregistry.models.OciDescriptor;
import com.azure.containers.containerregistry.models.OciImageManifest;
-import com.azure.containers.containerregistry.specialized.ContainerRegistryBlobClient;
-import com.azure.containers.containerregistry.specialized.ContainerRegistryBlobClientBuilder;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.identity.DefaultAzureCredential;
@@ -22,7 +20,6 @@
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
-import java.util.Arrays;
public class DownloadImage {
private static final String ENDPOINT = "https://registryName.azurecr.io";
@@ -32,24 +29,24 @@ public class DownloadImage {
private static final DefaultAzureCredential CREDENTIAL = new DefaultAzureCredentialBuilder().build();
public static void main(String[] args) throws IOException {
- ContainerRegistryBlobClient blobClient = new ContainerRegistryBlobClientBuilder()
+ ContainerRegistryContentClient contentClient = new ContainerRegistryContentClientBuilder()
.endpoint(ENDPOINT)
- .repository(REPOSITORY)
+ .repositoryName(REPOSITORY)
.credential(CREDENTIAL)
.buildClient();
// BEGIN: readme-sample-downloadImage
- DownloadManifestResult manifestResult = blobClient.downloadManifest("latest");
+ GetManifestResult manifestResult = contentClient.getManifest("latest");
- OciImageManifest manifest = manifestResult.asOciManifest();
+ OciImageManifest manifest = manifestResult.getManifest().toObject(OciImageManifest.class);
System.out.printf("Got manifest:\n%s\n", PRETTY_PRINT.writeValueAsString(manifest));
- String configFileName = manifest.getConfig().getDigest() + ".json";
- blobClient.downloadStream(manifest.getConfig().getDigest(), createFileChannel(configFileName));
+ String configFileName = manifest.getConfiguration().getDigest() + ".json";
+ contentClient.downloadStream(manifest.getConfiguration().getDigest(), createFileChannel(configFileName));
System.out.printf("Got config: %s\n", configFileName);
for (OciDescriptor layer : manifest.getLayers()) {
- blobClient.downloadStream(layer.getDigest(), createFileChannel(layer.getDigest()));
+ contentClient.downloadStream(layer.getDigest(), createFileChannel(layer.getDigest()));
System.out.printf("Got layer: %s\n", layer.getDigest());
}
// END: readme-sample-downloadImage
@@ -77,9 +74,9 @@ private static String getTempDirectory() {
}
private void downloadStream() throws IOException {
- ContainerRegistryBlobClient blobClient = new ContainerRegistryBlobClientBuilder()
+ ContainerRegistryContentClient contentClient = new ContainerRegistryContentClientBuilder()
.endpoint(ENDPOINT)
- .repository(REPOSITORY)
+ .repositoryName(REPOSITORY)
.credential(CREDENTIAL)
.buildClient();
@@ -88,59 +85,37 @@ private void downloadStream() throws IOException {
// BEGIN: com.azure.containers.containerregistry.downloadStream
Path file = Files.createTempFile(digest, ".tmp");
SeekableByteChannel channel = Files.newByteChannel(file, StandardOpenOption.CREATE_NEW, StandardOpenOption.WRITE);
- blobClient.downloadStream(digest, channel);
+ contentClient.downloadStream(digest, channel);
// END: com.azure.containers.containerregistry.downloadStream
}
- private void downloadManifest() {
- ContainerRegistryBlobClient blobClient = new ContainerRegistryBlobClientBuilder()
+ private void getManifest() {
+ ContainerRegistryContentClient contentClient = new ContainerRegistryContentClientBuilder()
.endpoint(ENDPOINT)
- .repository(REPOSITORY)
+ .repositoryName(REPOSITORY)
.credential(CREDENTIAL)
.buildClient();
- // BEGIN: com.azure.containers.containerregistry.downloadManifestTag
- DownloadManifestResult latestResult = blobClient.downloadManifest("latest");
- if (ManifestMediaType.DOCKER_MANIFEST.equals(latestResult.getMediaType())
- || ManifestMediaType.OCI_MANIFEST.equals(latestResult.getMediaType())) {
- OciImageManifest manifest = latestResult.asOciManifest();
+ // BEGIN: com.azure.containers.containerregistry.getManifestTag
+ GetManifestResult latestResult = contentClient.getManifest("latest");
+ if (ManifestMediaType.DOCKER_MANIFEST.equals(latestResult.getManifestMediaType())
+ || ManifestMediaType.OCI_MANIFEST.equals(latestResult.getManifestMediaType())) {
+ OciImageManifest manifest = latestResult.getManifest().toObject(OciImageManifest.class);
} else {
- throw new IllegalArgumentException("Unexpected manifest type: " + latestResult.getMediaType());
+ throw new IllegalArgumentException("Unexpected manifest type: " + latestResult.getManifestMediaType());
}
- // END: com.azure.containers.containerregistry.downloadManifestTag
+ // END: com.azure.containers.containerregistry.getManifestTag
- // BEGIN: com.azure.containers.containerregistry.downloadManifestDigest
- DownloadManifestResult digestResult = blobClient.downloadManifest(
+ // BEGIN: com.azure.containers.containerregistry.getManifestDigest
+ GetManifestResult getManifestResult = contentClient.getManifest(
"sha256:6581596932dc735fd0df8cc240e6c28845a66829126da5ce25b983cf244e2311");
- // END: com.azure.containers.containerregistry.downloadManifestDigest
- }
-
- private void downloadCustomManifest() {
- ContainerRegistryBlobClient blobClient = new ContainerRegistryBlobClientBuilder()
- .endpoint(ENDPOINT)
- .repository(REPOSITORY)
- .credential(CREDENTIAL)
- .buildClient();
-
- // BEGIN: com.azure.containers.containerregistry.downloadCustomManifest
- ManifestMediaType dockerListType = ManifestMediaType
- .fromString("application/vnd.docker.distribution.manifest.list.v2+json");
- ManifestMediaType ociIndexType = ManifestMediaType
- .fromString("application/vnd.oci.image.index.v1+json");
+ // END: com.azure.containers.containerregistry.getManifestDigest
- Response response = blobClient.downloadManifestWithResponse(
- "latest",
- Arrays.asList(dockerListType, ociIndexType),
+ // BEGIN: com.azure.containers.containerregistry.getManifestWithResponse
+ Response downloadResponse = contentClient.getManifestWithResponse("latest",
Context.NONE);
- if (dockerListType.equals(response.getValue().getMediaType())) {
- // DockerManifestList manifestList = downloadResult.getValue().getContent().toObject(DockerManifestList.class);
- System.out.println("Got docker manifest list");
- } else if (ociIndexType.equals(response.getValue().getMediaType())) {
- // OciIndex ociIndex = downloadResult.getValue().getContent().toObject(OciIndex.class);
- System.out.println("Got OCI index");
- } else {
- throw new IllegalArgumentException("Got unexpected manifest type: " + response.getValue().getMediaType());
- }
- // END: com.azure.containers.containerregistry.downloadCustomManifest
+ System.out.printf("Received manifest: digest - %s, response code: %s\n", downloadResponse.getValue().getDigest(),
+ downloadResponse.getStatusCode());
+ // END: com.azure.containers.containerregistry.getManifestWithResponse
}
}
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/samples/java/com/azure/containers/containerregistry/DownloadImageAsync.java b/sdk/containerregistry/azure-containers-containerregistry/src/samples/java/com/azure/containers/containerregistry/DownloadImageAsync.java
index cc78b52105247..1acbda7e20d35 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/samples/java/com/azure/containers/containerregistry/DownloadImageAsync.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/samples/java/com/azure/containers/containerregistry/DownloadImageAsync.java
@@ -3,10 +3,10 @@
package com.azure.containers.containerregistry;
+import com.azure.containers.containerregistry.models.GetManifestResult;
import com.azure.containers.containerregistry.models.ManifestMediaType;
import com.azure.containers.containerregistry.models.OciImageManifest;
-import com.azure.containers.containerregistry.specialized.ContainerRegistryBlobAsyncClient;
-import com.azure.containers.containerregistry.specialized.ContainerRegistryBlobClientBuilder;
+import com.azure.core.util.FluxUtil;
import com.azure.identity.DefaultAzureCredential;
import com.azure.identity.DefaultAzureCredentialBuilder;
import com.fasterxml.jackson.core.JsonProcessingException;
@@ -23,7 +23,6 @@
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
-import java.util.Arrays;
public class DownloadImageAsync {
private static final String ENDPOINT = "https://registryName.azurecr.io";
@@ -33,32 +32,32 @@ public class DownloadImageAsync {
private static final DefaultAzureCredential CREDENTIAL = new DefaultAzureCredentialBuilder().build();
public static void main(String[] args) {
- ContainerRegistryBlobAsyncClient blobClient = new ContainerRegistryBlobClientBuilder()
+ ContainerRegistryContentAsyncClient contentClient = new ContainerRegistryContentClientBuilder()
.endpoint(ENDPOINT)
- .repository(REPOSITORY)
+ .repositoryName(REPOSITORY)
.credential(CREDENTIAL)
.buildAsyncClient();
// BEGIN: readme-sample-downloadImageAsync
- blobClient
- .downloadManifest("latest")
- .map(manifestResult -> manifestResult.asOciManifest())
+ contentClient
+ .getManifest("latest")
+ .map(manifestResult -> manifestResult.getManifest().toObject(OciImageManifest.class))
.doOnSuccess(manifest -> System.out.printf("Got manifest:\n%s\n", prettyPrint(manifest)))
.flatMapMany(manifest -> {
- String configFileName = manifest.getConfig().getDigest() + ".json";
+ String configFileName = manifest.getConfiguration().getDigest() + ".json";
FileChannel configChannel = createFileChannel(configFileName);
- Mono downloadConfig = blobClient
- .downloadStream(manifest.getConfig().getDigest())
- .flatMap(downloadResponse -> downloadResponse.writeValueTo(configChannel))
+ Mono downloadConfig = contentClient
+ .downloadStream(manifest.getConfiguration().getDigest())
+ .flatMap(downloadResponse -> FluxUtil.writeToWritableByteChannel(downloadResponse.toFluxByteBuffer(), configChannel))
.doOnSuccess(i -> System.out.printf("Got config: %s\n", configFileName))
.doFinally(i -> closeStream(configChannel));
Flux downloadLayers = Flux.fromIterable(manifest.getLayers())
.flatMap(layer -> {
FileChannel layerChannel = createFileChannel(layer.getDigest());
- return blobClient.downloadStream(layer.getDigest())
- .flatMap(downloadResponse -> downloadResponse.writeValueTo(layerChannel))
+ return contentClient.downloadStream(layer.getDigest())
+ .flatMap(downloadResponse -> FluxUtil.writeToWritableByteChannel(downloadResponse.toFluxByteBuffer(), layerChannel))
.doOnSuccess(i -> System.out.printf("Got layer: %s\n", layer.getDigest()))
.doFinally(i -> closeStream(layerChannel));
});
@@ -72,31 +71,32 @@ public static void main(String[] args) {
}
private static void downloadBlob() {
- ContainerRegistryBlobAsyncClient blobClient = new ContainerRegistryBlobClientBuilder()
+ ContainerRegistryContentAsyncClient contentClient = new ContainerRegistryContentClientBuilder()
.endpoint(ENDPOINT)
- .repository(REPOSITORY)
+ .repositoryName(REPOSITORY)
.credential(CREDENTIAL)
.buildAsyncClient();
String digest = "sha256:6581596932dc735fd0df8cc240e6c28845a66829126da5ce25b983cf244e2311";
// BEGIN: com.azure.containers.containerregistry.downloadStreamAsyncFile
- blobClient
+ contentClient
.downloadStream(digest)
.flatMap(downloadResult ->
Mono.using(() -> new FileOutputStream(trimSha(digest)),
- fileStream -> downloadResult.writeValueTo(fileStream.getChannel()),
+ fileStream -> FluxUtil.writeToWritableByteChannel(
+ downloadResult.toFluxByteBuffer(), fileStream.getChannel()),
fileStream -> closeStream(fileStream)))
.block();
// END: com.azure.containers.containerregistry.downloadStreamAsyncFile
// BEGIN: com.azure.containers.containerregistry.downloadStreamAsyncSocket
- blobClient
+ contentClient
.downloadStream(digest)
.flatMap(downloadResult ->
Mono.using(
() -> openSocket(),
- socket -> downloadResult.writeValueToAsync(socket),
+ socket -> FluxUtil.writeToAsynchronousByteChannel(downloadResult.toFluxByteBuffer(), socket),
socket -> closeStream(socket)))
.block();
// END: com.azure.containers.containerregistry.downloadStreamAsyncSocket
@@ -116,58 +116,49 @@ private static AsynchronousSocketChannel openSocket() {
return null;
}
- private static void downloadManifest() {
- ContainerRegistryBlobAsyncClient blobClient = new ContainerRegistryBlobClientBuilder()
+ private static void getManifest() {
+ ContainerRegistryContentAsyncClient contentClient = new ContainerRegistryContentClientBuilder()
.endpoint(ENDPOINT)
- .repository(REPOSITORY)
+ .repositoryName(REPOSITORY)
.credential(CREDENTIAL)
.buildAsyncClient();
- // BEGIN: com.azure.containers.containerregistry.downloadManifestAsync
- blobClient.downloadManifest("latest")
+ // BEGIN: com.azure.containers.containerregistry.getManifestAsync
+ contentClient.getManifest("latest")
.doOnNext(downloadResult -> {
- if (ManifestMediaType.OCI_MANIFEST.equals(downloadResult.getMediaType())
- || ManifestMediaType.DOCKER_MANIFEST.equals(downloadResult.getMediaType())) {
- OciImageManifest manifest = downloadResult.asOciManifest();
+ if (ManifestMediaType.OCI_MANIFEST.equals(downloadResult.getManifestMediaType())
+ || ManifestMediaType.DOCKER_MANIFEST.equals(downloadResult.getManifestMediaType())) {
+ OciImageManifest manifest = downloadResult.getManifest().toObject(OciImageManifest.class);
System.out.println("Got OCI manifest");
} else {
- throw new IllegalArgumentException("Unexpected manifest type: " + downloadResult.getMediaType());
+ throw new IllegalArgumentException("Unexpected manifest type: " + downloadResult.getManifestMediaType());
}
})
.block();
- // END: com.azure.containers.containerregistry.downloadManifestAsync
+ // END: com.azure.containers.containerregistry.getManifestAsync
}
- private static void downloadCustomManifestMediaType() {
- DefaultAzureCredential credential = new DefaultAzureCredentialBuilder().build();
- ContainerRegistryBlobAsyncClient blobClient = new ContainerRegistryBlobClientBuilder()
+ private static void getManifestWithResponse() {
+ ContainerRegistryContentAsyncClient contentClient = new ContainerRegistryContentClientBuilder()
.endpoint(ENDPOINT)
- .repository(REPOSITORY)
- .credential(credential)
+ .repositoryName(REPOSITORY)
+ .credential(CREDENTIAL)
.buildAsyncClient();
- // BEGIN: com.azure.containers.containerregistry.downloadCustomManifestAsync
- ManifestMediaType dockerListType = ManifestMediaType
- .fromString("application/vnd.docker.distribution.manifest.list.v2+json");
- ManifestMediaType ociIndexType = ManifestMediaType
- .fromString("application/vnd.oci.image.index.v1+json");
-
- blobClient.downloadManifestWithResponse("latest", Arrays.asList(dockerListType, ociIndexType))
- .doOnNext(downloadResult -> {
- if (dockerListType.equals(downloadResult.getValue().getMediaType())) {
- // DockerManifestList manifestList =
- // downloadResult.getValue().getContent().toObject(DockerManifestList.class);
- System.out.println("Got docker manifest list");
- } else if (ociIndexType.equals(downloadResult.getValue().getMediaType())) {
- // OciIndex ociIndex = downloadResult.getValue().getContent().toObject(OciIndex.class);
- System.out.println("Got OCI index");
+ // BEGIN: com.azure.containers.containerregistry.getManifestWithResponseAsync
+ contentClient.getManifestWithResponse("latest")
+ .doOnNext(response -> {
+ GetManifestResult manifestResult = response.getValue();
+ if (ManifestMediaType.OCI_MANIFEST.equals(manifestResult.getManifestMediaType())
+ || ManifestMediaType.DOCKER_MANIFEST.equals(manifestResult.getManifestMediaType())) {
+ OciImageManifest manifest = manifestResult.getManifest().toObject(OciImageManifest.class);
+ System.out.println("Got OCI manifest");
} else {
- throw new IllegalArgumentException("Got unexpected content type: "
- + downloadResult.getValue().getMediaType());
+ throw new IllegalArgumentException("Unexpected manifest type: " + manifestResult.getManifestMediaType());
}
})
.block();
- // END: com.azure.containers.containerregistry.downloadCustomManifestAsync
+ // END: com.azure.containers.containerregistry.getManifestWithResponseAsync
}
private static String prettyPrint(OciImageManifest manifest) {
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/samples/java/com/azure/containers/containerregistry/ReadmeSamples.java b/sdk/containerregistry/azure-containers-containerregistry/src/samples/java/com/azure/containers/containerregistry/ReadmeSamples.java
index acf812f8f149b..f18685ed60ec5 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/samples/java/com/azure/containers/containerregistry/ReadmeSamples.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/samples/java/com/azure/containers/containerregistry/ReadmeSamples.java
@@ -6,12 +6,9 @@
import com.azure.containers.containerregistry.models.ArtifactTagProperties;
import com.azure.containers.containerregistry.models.ArtifactManifestOrder;
import com.azure.containers.containerregistry.models.ContainerRegistryAudience;
-import com.azure.containers.containerregistry.models.DownloadManifestResult;
+import com.azure.containers.containerregistry.models.GetManifestResult;
import com.azure.containers.containerregistry.models.OciDescriptor;
import com.azure.containers.containerregistry.models.OciImageManifest;
-import com.azure.containers.containerregistry.specialized.ContainerRegistryBlobAsyncClient;
-import com.azure.containers.containerregistry.specialized.ContainerRegistryBlobClient;
-import com.azure.containers.containerregistry.specialized.ContainerRegistryBlobClientBuilder;
import com.azure.core.credential.TokenCredential;
import com.azure.core.exception.ClientAuthenticationException;
import com.azure.core.exception.HttpResponseException;
@@ -40,15 +37,15 @@ public void createClient() {
// END: readme-sample-createClient
}
- public void createBlobClient() {
- // BEGIN: readme-sample-createBlobClient
+ public void createContentClient() {
+ // BEGIN: readme-sample-createContentClient
DefaultAzureCredential credential = new DefaultAzureCredentialBuilder().build();
- ContainerRegistryBlobClient blobClient = new ContainerRegistryBlobClientBuilder()
+ ContainerRegistryContentClient contentClient = new ContainerRegistryContentClientBuilder()
.endpoint(endpoint)
.credential(credential)
- .repository(repository)
+ .repositoryName(repository)
.buildClient();
- // END: readme-sample-createBlobClient
+ // END: readme-sample-createContentClient
}
public void createAsyncClient() {
@@ -64,10 +61,10 @@ public void createAsyncClient() {
public void createBlobAsyncClient() {
// BEGIN: readme-sample-createBlobAsyncClient
DefaultAzureCredential credential = new DefaultAzureCredentialBuilder().build();
- ContainerRegistryBlobAsyncClient blobClient = new ContainerRegistryBlobClientBuilder()
+ ContainerRegistryContentAsyncClient contentClient = new ContainerRegistryContentClientBuilder()
.endpoint(endpoint)
.credential(credential)
- .repository(repository)
+ .repositoryName(repository)
.buildAsyncClient();
// END: readme-sample-createBlobAsyncClient
}
@@ -285,59 +282,59 @@ public void armTokenSample() {
}
public void deleteBlob() {
- ContainerRegistryBlobClient blobClient = new ContainerRegistryBlobClientBuilder()
+ ContainerRegistryContentClient contentClient = new ContainerRegistryContentClientBuilder()
.endpoint(getEndpoint())
- .repository(repository)
+ .repositoryName(repository)
.credential(credential)
.buildClient();
// BEGIN: readme-sample-deleteBlob
- DownloadManifestResult manifestResult = blobClient.downloadManifest("latest");
+ GetManifestResult manifestResult = contentClient.getManifest("latest");
- OciImageManifest manifest = manifestResult.asOciManifest();
+ OciImageManifest manifest = manifestResult.getManifest().toObject(OciImageManifest.class);
for (OciDescriptor layer : manifest.getLayers()) {
- blobClient.deleteBlob(layer.getDigest());
+ contentClient.deleteBlob(layer.getDigest());
}
// END: readme-sample-deleteBlob
}
public void deleteManifest() {
- ContainerRegistryBlobClient blobClient = new ContainerRegistryBlobClientBuilder()
+ ContainerRegistryContentClient contentClient = new ContainerRegistryContentClientBuilder()
.endpoint(getEndpoint())
- .repository(repository)
+ .repositoryName(repository)
.credential(credential)
.buildClient();
// BEGIN: readme-sample-deleteManifest
- DownloadManifestResult manifestResult = blobClient.downloadManifest("latest");
- blobClient.deleteManifest(manifestResult.getDigest());
+ GetManifestResult manifestResult = contentClient.getManifest("latest");
+ contentClient.deleteManifest(manifestResult.getDigest());
// END: readme-sample-deleteManifest
}
public void deleteBlobAsync() {
- ContainerRegistryBlobAsyncClient blobClient = new ContainerRegistryBlobClientBuilder()
+ ContainerRegistryContentAsyncClient contentClient = new ContainerRegistryContentClientBuilder()
.endpoint(getEndpoint())
- .repository(repository)
+ .repositoryName(repository)
.credential(credential)
.buildAsyncClient();
// BEGIN: readme-sample-deleteBlobAsync
- blobClient.downloadManifest("latest")
- .flatMap(manifest -> blobClient.deleteBlob(manifest.getDigest()))
+ contentClient.getManifest("latest")
+ .flatMap(manifest -> contentClient.deleteBlob(manifest.getDigest()))
.block();
// END: readme-sample-deleteBlobAsync
}
public void deleteManifestAsync() {
- ContainerRegistryBlobAsyncClient blobClient = new ContainerRegistryBlobClientBuilder()
+ ContainerRegistryContentAsyncClient contentClient = new ContainerRegistryContentClientBuilder()
.endpoint(getEndpoint())
- .repository(repository)
+ .repositoryName(repository)
.credential(credential)
.buildAsyncClient();
// BEGIN: readme-sample-deleteManifestAsync
- blobClient.downloadManifest("latest")
- .flatMap(manifest -> blobClient.deleteManifest(manifest.getDigest()))
+ contentClient.getManifest("latest")
+ .flatMap(manifest -> contentClient.deleteManifest(manifest.getDigest()))
.block();
// END: readme-sample-deleteManifestAsync
}
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/samples/java/com/azure/containers/containerregistry/UploadImage.java b/sdk/containerregistry/azure-containers-containerregistry/src/samples/java/com/azure/containers/containerregistry/UploadImage.java
index c4d7dab49fa10..61127bd261496 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/samples/java/com/azure/containers/containerregistry/UploadImage.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/samples/java/com/azure/containers/containerregistry/UploadImage.java
@@ -6,11 +6,9 @@
import com.azure.containers.containerregistry.models.ManifestMediaType;
import com.azure.containers.containerregistry.models.OciDescriptor;
import com.azure.containers.containerregistry.models.OciImageManifest;
-import com.azure.containers.containerregistry.models.UploadBlobResult;
-import com.azure.containers.containerregistry.models.UploadManifestOptions;
-import com.azure.containers.containerregistry.models.UploadManifestResult;
-import com.azure.containers.containerregistry.specialized.ContainerRegistryBlobClient;
-import com.azure.containers.containerregistry.specialized.ContainerRegistryBlobClientBuilder;
+import com.azure.containers.containerregistry.models.UploadRegistryBlobResult;
+import com.azure.containers.containerregistry.models.SetManifestOptions;
+import com.azure.containers.containerregistry.models.SetManifestResult;
import com.azure.core.http.rest.Response;
import com.azure.core.util.BinaryData;
import com.azure.core.util.Context;
@@ -27,19 +25,17 @@ public class UploadImage {
private static final String REPOSITORY = "hello/world";
private static final DefaultAzureCredential CREDENTIAL = new DefaultAzureCredentialBuilder().build();
private static final ManifestMediaType DOCKER_MANIFEST_LIST_TYPE = ManifestMediaType.fromString("application/vnd.docker.distribution.manifest.list.v2+json");
- private static final String OUT_DIRECTORY = getTempDirectory();
public static void main(String[] args) {
-
- ContainerRegistryBlobClient blobClient = new ContainerRegistryBlobClientBuilder()
+ ContainerRegistryContentClient contentClient = new ContainerRegistryContentClientBuilder()
.endpoint(ENDPOINT)
- .repository(REPOSITORY)
+ .repositoryName(REPOSITORY)
.credential(CREDENTIAL)
.buildClient();
// BEGIN: readme-sample-uploadImage
BinaryData configContent = BinaryData.fromObject(Collections.singletonMap("hello", "world"));
- UploadBlobResult configUploadResult = blobClient.uploadBlob(configContent);
+ UploadRegistryBlobResult configUploadResult = contentClient.uploadBlob(configContent);
System.out.printf("Uploaded config: digest - %s, size - %s\n", configUploadResult.getDigest(), configContent.getLength());
OciDescriptor configDescriptor = new OciDescriptor()
@@ -48,11 +44,11 @@ public static void main(String[] args) {
.setSizeInBytes(configContent.getLength());
BinaryData layerContent = BinaryData.fromString("Hello Azure Container Registry");
- UploadBlobResult layerUploadResult = blobClient.uploadBlob(layerContent);
+ UploadRegistryBlobResult layerUploadResult = contentClient.uploadBlob(layerContent);
System.out.printf("Uploaded layer: digest - %s, size - %s\n", layerUploadResult.getDigest(), layerContent.getLength());
OciImageManifest manifest = new OciImageManifest()
- .setConfig(configDescriptor)
+ .setConfiguration(configDescriptor)
.setSchemaVersion(2)
.setLayers(Collections.singletonList(
new OciDescriptor()
@@ -60,7 +56,7 @@ public static void main(String[] args) {
.setSizeInBytes(layerContent.getLength())
.setMediaType("application/octet-stream")));
- UploadManifestResult manifestResult = blobClient.uploadManifest(manifest, "latest");
+ SetManifestResult manifestResult = contentClient.setManifest(manifest, "latest");
System.out.printf("Uploaded manifest: digest - %s\n", manifestResult.getDigest());
// END: readme-sample-uploadImage
@@ -68,46 +64,46 @@ public static void main(String[] args) {
}
private void uploadBlobBinaryData() {
- ContainerRegistryBlobClient blobClient = new ContainerRegistryBlobClientBuilder()
+ ContainerRegistryContentClient contentClient = new ContainerRegistryContentClientBuilder()
.endpoint(ENDPOINT)
- .repository(REPOSITORY)
+ .repositoryName(REPOSITORY)
.credential(CREDENTIAL)
.buildClient();
// BEGIN: com.azure.containers.containerregistry.uploadBlob
BinaryData configContent = BinaryData.fromObject(Collections.singletonMap("hello", "world"));
- UploadBlobResult uploadResult = blobClient.uploadBlob(configContent);
+ UploadRegistryBlobResult uploadResult = contentClient.uploadBlob(configContent);
System.out.printf("Uploaded blob: digest - '%s', size - %s\n", uploadResult.getDigest(), uploadResult.getSizeInBytes());
// END: com.azure.containers.containerregistry.uploadBlob
}
private void uploadStream() throws IOException {
- ContainerRegistryBlobClient blobClient = new ContainerRegistryBlobClientBuilder()
+ ContainerRegistryContentClient contentClient = new ContainerRegistryContentClientBuilder()
.endpoint(ENDPOINT)
- .repository(REPOSITORY)
+ .repositoryName(REPOSITORY)
.credential(CREDENTIAL)
.buildClient();
// BEGIN: com.azure.containers.containerregistry.uploadStream
try (FileInputStream content = new FileInputStream("artifact.tar.gz")) {
- UploadBlobResult uploadResult = blobClient.uploadBlob(content.getChannel(), Context.NONE);
+ UploadRegistryBlobResult uploadResult = contentClient.uploadBlob(content.getChannel(), Context.NONE);
System.out.printf("Uploaded blob: digest - '%s', size - %s\n",
uploadResult.getDigest(), uploadResult.getSizeInBytes());
}
// END: com.azure.containers.containerregistry.uploadStream
}
- private void uploadManifest() {
- ContainerRegistryBlobClient blobClient = new ContainerRegistryBlobClientBuilder()
+ private void setManifest() {
+ ContainerRegistryContentClient contentClient = new ContainerRegistryContentClientBuilder()
.endpoint(ENDPOINT)
- .repository(REPOSITORY)
+ .repositoryName(REPOSITORY)
.credential(CREDENTIAL)
.buildClient();
BinaryData configContent = BinaryData.fromObject(Collections.singletonMap("hello", "world"));
- UploadBlobResult configUploadResult = blobClient.uploadBlob(configContent);
+ UploadRegistryBlobResult configUploadResult = contentClient.uploadBlob(configContent);
OciDescriptor configDescriptor = new OciDescriptor()
.setMediaType("application/vnd.unknown.config.v1+json")
@@ -115,10 +111,10 @@ private void uploadManifest() {
.setSizeInBytes(configContent.getLength());
BinaryData layerContent = BinaryData.fromString("Hello Azure Container Registry");
- UploadBlobResult layerUploadResult = blobClient.uploadBlob(layerContent);
+ UploadRegistryBlobResult layerUploadResult = contentClient.uploadBlob(layerContent);
OciImageManifest manifest = new OciImageManifest()
- .setConfig(configDescriptor)
+ .setConfiguration(configDescriptor)
.setSchemaVersion(2)
.setLayers(Collections.singletonList(
new OciDescriptor()
@@ -126,15 +122,15 @@ private void uploadManifest() {
.setSizeInBytes(layerContent.getLength())
.setMediaType("application/octet-stream")));
- // BEGIN: com.azure.containers.containerregistry.uploadManifest
- blobClient.uploadManifest(manifest, "v1");
- // END: com.azure.containers.containerregistry.uploadManifest
+ // BEGIN: com.azure.containers.containerregistry.setManifest
+ contentClient.setManifest(manifest, "v1");
+ // END: com.azure.containers.containerregistry.setManifest
}
private void uploadCustomManifestMediaType() {
- ContainerRegistryBlobClient blobClient = new ContainerRegistryBlobClientBuilder()
+ ContainerRegistryContentClient contentClient = new ContainerRegistryContentClientBuilder()
.endpoint(ENDPOINT)
- .repository(REPOSITORY)
+ .repositoryName(REPOSITORY)
.credential(CREDENTIAL)
.buildClient();
@@ -158,9 +154,9 @@ private void uploadCustomManifestMediaType() {
BinaryData manifestList = BinaryData.fromString(manifest);
// BEGIN: com.azure.containers.containerregistry.uploadCustomManifest
- UploadManifestOptions options = new UploadManifestOptions(manifestList, DOCKER_MANIFEST_LIST_TYPE);
+ SetManifestOptions options = new SetManifestOptions(manifestList, DOCKER_MANIFEST_LIST_TYPE);
- Response response = blobClient.uploadManifestWithResponse(options, Context.NONE);
+ Response response = contentClient.setManifestWithResponse(options, Context.NONE);
System.out.println("Manifest uploaded, digest - " + response.getValue().getDigest());
// END: com.azure.containers.containerregistry.uploadCustomManifest
}
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/samples/java/com/azure/containers/containerregistry/UploadImageAsync.java b/sdk/containerregistry/azure-containers-containerregistry/src/samples/java/com/azure/containers/containerregistry/UploadImageAsync.java
index a226ffb0315ab..9d9b3ca9c6363 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/samples/java/com/azure/containers/containerregistry/UploadImageAsync.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/samples/java/com/azure/containers/containerregistry/UploadImageAsync.java
@@ -6,10 +6,8 @@
import com.azure.containers.containerregistry.models.ManifestMediaType;
import com.azure.containers.containerregistry.models.OciDescriptor;
import com.azure.containers.containerregistry.models.OciImageManifest;
-import com.azure.containers.containerregistry.models.UploadManifestOptions;
-import com.azure.containers.containerregistry.models.UploadManifestResult;
-import com.azure.containers.containerregistry.specialized.ContainerRegistryBlobAsyncClient;
-import com.azure.containers.containerregistry.specialized.ContainerRegistryBlobClientBuilder;
+import com.azure.containers.containerregistry.models.SetManifestOptions;
+import com.azure.containers.containerregistry.models.SetManifestResult;
import com.azure.core.util.BinaryData;
import com.azure.core.util.FluxUtil;
import com.azure.identity.DefaultAzureCredential;
@@ -33,16 +31,16 @@ public class UploadImageAsync {
private static final int CHUNK_SIZE = 4 * 1024 * 1024; // content will be uploaded in chunks of up to 4MB size
public static void main(String[] args) {
- ContainerRegistryBlobAsyncClient blobClient = new ContainerRegistryBlobClientBuilder()
+ ContainerRegistryContentAsyncClient contentClient = new ContainerRegistryContentClientBuilder()
.endpoint(ENDPOINT)
- .repository(REPOSITORY)
+ .repositoryName(REPOSITORY)
.credential(CREDENTIAL)
.buildAsyncClient();
// BEGIN: readme-sample-uploadImageAsync
BinaryData configContent = BinaryData.fromObject(Collections.singletonMap("hello", "world"));
- Mono uploadConfig = blobClient
+ Mono uploadConfig = contentClient
.uploadBlob(configContent)
.map(result -> new OciDescriptor()
.setMediaType("application/vnd.unknown.config.v1+json")
@@ -50,7 +48,7 @@ public static void main(String[] args) {
.setSizeInBytes(result.getSizeInBytes()));
Flux layerContent = getData(1024 * 1024 * 1024); // 1 GB
- Mono uploadLayer = blobClient
+ Mono uploadLayer = contentClient
.uploadBlob(layerContent)
.map(result -> new OciDescriptor()
.setDigest(result.getDigest())
@@ -59,10 +57,10 @@ public static void main(String[] args) {
Mono.zip(uploadConfig, uploadLayer)
.map(tuple -> new OciImageManifest()
- .setConfig(tuple.getT1())
+ .setConfiguration(tuple.getT1())
.setSchemaVersion(2)
.setLayers(Collections.singletonList(tuple.getT2())))
- .flatMap(manifest -> blobClient.uploadManifest(manifest, "latest"))
+ .flatMap(manifest -> contentClient.setManifest(manifest, "latest"))
.doOnSuccess(manifestResult -> System.out.printf("Uploaded manifest: digest - %s\n", manifestResult.getDigest()))
.block();
// END: readme-sample-uploadImageAsync
@@ -91,16 +89,16 @@ private static Flux getData(long size) {
});
}
- private void uploadManifest() {
- ContainerRegistryBlobAsyncClient blobClient = new ContainerRegistryBlobClientBuilder()
+ private void setManifest() {
+ ContainerRegistryContentAsyncClient contentClient = new ContainerRegistryContentClientBuilder()
.endpoint(ENDPOINT)
- .repository(REPOSITORY)
+ .repositoryName(REPOSITORY)
.credential(CREDENTIAL)
.buildAsyncClient();
BinaryData configContent = BinaryData.fromObject(Collections.singletonMap("hello", "world"));
- Mono config = blobClient
+ Mono config = contentClient
.uploadBlob(configContent)
.map(configUploadResult -> new OciDescriptor()
.setMediaType("application/vnd.unknown.config.v1+json")
@@ -108,7 +106,7 @@ private void uploadManifest() {
.setSizeInBytes(configContent.getLength()));
Flux layerContent = getData(1024 * 1024 * 1024); // 1 GB
- Mono layer = blobClient
+ Mono layer = contentClient
.uploadBlob(layerContent)
.map(result -> new OciDescriptor()
.setDigest(result.getDigest())
@@ -118,13 +116,13 @@ private void uploadManifest() {
config
.flatMap(configDescriptor ->
layer.flatMap(layerDescriptor -> {
- // BEGIN: com.azure.containers.containerregistry.uploadManifestAsync
+ // BEGIN: com.azure.containers.containerregistry.setManifestAsync
OciImageManifest manifest = new OciImageManifest()
- .setConfig(configDescriptor)
+ .setConfiguration(configDescriptor)
.setSchemaVersion(2)
.setLayers(Collections.singletonList(layerDescriptor));
- Mono result = blobClient.uploadManifest(manifest, "latest");
- // END: com.azure.containers.containerregistry.uploadManifestAsync
+ Mono result = contentClient.setManifest(manifest, "latest");
+ // END: com.azure.containers.containerregistry.setManifestAsync
return result;
}))
.subscribe(result -> System.out.println("Manifest uploaded, digest - " + result.getDigest()));
@@ -132,9 +130,9 @@ private void uploadManifest() {
private void uploadCustomManifestMediaType() {
DefaultAzureCredential credential = new DefaultAzureCredentialBuilder().build();
- ContainerRegistryBlobAsyncClient blobClient = new ContainerRegistryBlobClientBuilder()
+ ContainerRegistryContentAsyncClient contentClient = new ContainerRegistryContentClientBuilder()
.endpoint(ENDPOINT)
- .repository(REPOSITORY)
+ .repositoryName(REPOSITORY)
.credential(credential)
.buildAsyncClient();
@@ -158,26 +156,26 @@ private void uploadCustomManifestMediaType() {
BinaryData manifestList = BinaryData.fromString(manifest);
// BEGIN: com.azure.containers.containerregistry.uploadCustomManifestAsync
- UploadManifestOptions options = new UploadManifestOptions(manifestList, DOCKER_MANIFEST_LIST_TYPE)
+ SetManifestOptions options = new SetManifestOptions(manifestList, DOCKER_MANIFEST_LIST_TYPE)
.setTag("v2");
- blobClient.uploadManifestWithResponse(options)
+ contentClient.setManifestWithResponse(options)
.subscribe(response ->
System.out.println("Manifest uploaded, digest - " + response.getValue().getDigest()));
// END: com.azure.containers.containerregistry.uploadCustomManifestAsync
}
private void uploadBlob() throws FileNotFoundException {
- ContainerRegistryBlobAsyncClient blobClient = new ContainerRegistryBlobClientBuilder()
+ ContainerRegistryContentAsyncClient contentClient = new ContainerRegistryContentClientBuilder()
.endpoint(ENDPOINT)
- .repository(REPOSITORY)
+ .repositoryName(REPOSITORY)
.credential(CREDENTIAL)
.buildAsyncClient();
// BEGIN: com.azure.containers.containerregistry.uploadBlobAsync
BinaryData configContent = BinaryData.fromObject(Collections.singletonMap("hello", "world"));
- blobClient
+ contentClient
.uploadBlob(configContent)
.subscribe(uploadResult -> System.out.printf("Uploaded blob: digest - '%s', size - %s\n",
uploadResult.getDigest(), uploadResult.getSizeInBytes()));
@@ -186,7 +184,7 @@ private void uploadBlob() throws FileNotFoundException {
// BEGIN: com.azure.containers.containerregistry.uploadStreamAsync
Flux.using(
() -> new FileInputStream("artifact.tar.gz"),
- fileStream -> blobClient.uploadBlob(FluxUtil.toFluxByteBuffer(fileStream, CHUNK_SIZE)),
+ fileStream -> contentClient.uploadBlob(FluxUtil.toFluxByteBuffer(fileStream, CHUNK_SIZE)),
this::closeStream)
.subscribe(uploadResult ->
System.out.printf("Uploaded blob: digest - '%s', size - %s\n",
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/java/com/azure/containers/containerregistry/ContainerRegistryClientsTestBase.java b/sdk/containerregistry/azure-containers-containerregistry/src/test/java/com/azure/containers/containerregistry/ContainerRegistryClientsTestBase.java
index 12fd0c599513d..23e6b136c4a92 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/test/java/com/azure/containers/containerregistry/ContainerRegistryClientsTestBase.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/test/java/com/azure/containers/containerregistry/ContainerRegistryClientsTestBase.java
@@ -9,7 +9,6 @@
import com.azure.containers.containerregistry.models.ArtifactOperatingSystem;
import com.azure.containers.containerregistry.models.ArtifactTagProperties;
import com.azure.containers.containerregistry.models.ContainerRepositoryProperties;
-import com.azure.containers.containerregistry.specialized.ContainerRegistryBlobClientBuilder;
import com.azure.core.credential.TokenCredential;
import com.azure.core.http.HttpClient;
import com.azure.core.http.policy.HttpLogDetailLevel;
@@ -107,26 +106,28 @@ ContainerRegistryClientBuilder getContainerRegistryBuilder(HttpClient httpClient
return getContainerRegistryBuilder(httpClient, credential, REGISTRY_ENDPOINT);
}
- ContainerRegistryBlobClientBuilder getBlobClientBuilder(String repositoryName, HttpClient httpClient) {
+ ContainerRegistryContentClientBuilder getContentClientBuilder(String repositoryName, HttpClient httpClient) {
TokenCredential credential = getCredentialsByEndpoint(getTestMode(), REGISTRY_ENDPOINT);
- return getBlobClientBuilder(repositoryName, httpClient, credential);
+ return getContentClientBuilder(repositoryName, httpClient, credential);
}
- ContainerRegistryBlobClientBuilder getBlobClientBuilder(String repositoryName, HttpClient httpClient,
+ ContainerRegistryContentClientBuilder getContentClientBuilder(String repositoryName, HttpClient httpClient,
TokenCredential credential) {
- return getBlobClientBuilder(repositoryName, httpClient, credential, REGISTRY_ENDPOINT);
+ return getContentClientBuilder(repositoryName, httpClient, credential, REGISTRY_ENDPOINT);
}
- ContainerRegistryBlobClientBuilder getBlobClientBuilder(String repositoryName, HttpClient httpClient,
+ ContainerRegistryContentClientBuilder getContentClientBuilder(String repositoryName, HttpClient httpClient,
TokenCredential credential, String endpoint) {
List> redactors = new ArrayList<>();
redactors.add(data -> redact(data, JSON_PROPERTY_VALUE_REDACTION_PATTERN.matcher(data), "REDACTED"));
- return new ContainerRegistryBlobClientBuilder()
+ return new ContainerRegistryContentClientBuilder()
.endpoint(getEndpoint(endpoint))
- .repository(repositoryName)
+ .repositoryName(repositoryName)
.httpClient(httpClient == null ? interceptorManager.getPlaybackClient() : httpClient)
- .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS))
+ .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)
+ .addAllowedHeaderName("Range")
+ .addAllowedHeaderName("Content-Range"))
.addPolicy(interceptorManager.getRecordPolicy(redactors))
.credential(credential);
}
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/java/com/azure/containers/containerregistry/ContainerRegistryBlobClientIntegrationTests.java b/sdk/containerregistry/azure-containers-containerregistry/src/test/java/com/azure/containers/containerregistry/ContainerRegistryContentClientIntegrationTests.java
similarity index 61%
rename from sdk/containerregistry/azure-containers-containerregistry/src/test/java/com/azure/containers/containerregistry/ContainerRegistryBlobClientIntegrationTests.java
rename to sdk/containerregistry/azure-containers-containerregistry/src/test/java/com/azure/containers/containerregistry/ContainerRegistryContentClientIntegrationTests.java
index 8e38b4792232f..b746dd686c5ac 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/test/java/com/azure/containers/containerregistry/ContainerRegistryBlobClientIntegrationTests.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/test/java/com/azure/containers/containerregistry/ContainerRegistryContentClientIntegrationTests.java
@@ -5,16 +5,14 @@
import com.azure.containers.containerregistry.implementation.models.ManifestList;
import com.azure.containers.containerregistry.implementation.models.V2Manifest;
import com.azure.containers.containerregistry.models.ArtifactTagProperties;
-import com.azure.containers.containerregistry.models.DownloadManifestResult;
+import com.azure.containers.containerregistry.models.GetManifestResult;
import com.azure.containers.containerregistry.models.ManifestMediaType;
import com.azure.containers.containerregistry.models.OciDescriptor;
import com.azure.containers.containerregistry.models.OciImageManifest;
-import com.azure.containers.containerregistry.models.UploadBlobResult;
-import com.azure.containers.containerregistry.models.UploadManifestOptions;
-import com.azure.containers.containerregistry.models.UploadManifestResult;
-import com.azure.containers.containerregistry.specialized.ContainerRegistryBlobAsyncClient;
-import com.azure.containers.containerregistry.specialized.ContainerRegistryBlobClient;
-import com.azure.core.exception.ServiceResponseException;
+import com.azure.containers.containerregistry.models.UploadRegistryBlobResult;
+import com.azure.containers.containerregistry.models.SetManifestOptions;
+import com.azure.containers.containerregistry.models.SetManifestResult;
+import com.azure.core.exception.ResourceNotFoundException;
import com.azure.core.http.HttpClient;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
@@ -23,6 +21,7 @@
import com.azure.core.test.implementation.TestingHelpers;
import com.azure.core.util.BinaryData;
import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
@@ -42,10 +41,10 @@
import java.nio.channels.Channels;
import java.time.Duration;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
+import java.util.concurrent.atomic.AtomicLong;
import static com.azure.containers.containerregistry.TestUtils.CONFIG_DATA;
import static com.azure.containers.containerregistry.TestUtils.CONFIG_DIGEST;
@@ -66,9 +65,9 @@
import static org.junit.jupiter.api.Assumptions.assumeTrue;
@Execution(ExecutionMode.SAME_THREAD)
-public class ContainerRegistryBlobClientIntegrationTests extends ContainerRegistryClientsTestBase {
- private ContainerRegistryBlobClient client;
- private ContainerRegistryBlobAsyncClient asyncClient;
+public class ContainerRegistryContentClientIntegrationTests extends ContainerRegistryClientsTestBase {
+ private ContainerRegistryContentClient client;
+ private ContainerRegistryContentAsyncClient asyncClient;
private static final Random RANDOM = new Random(42);
private static final byte[] CHUNK = new byte[CHUNK_SIZE];
@@ -102,85 +101,64 @@ void afterEach() {
@ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
@MethodSource("getHttpClients")
public void canUploadOciManifest(HttpClient httpClient) {
- client = getBlobClient("oci-artifact", httpClient);
+ client = getContentClient("oci-artifact", httpClient);
- uploadManifestPrerequisites();
+ setManifestPrerequisites();
- UploadManifestResult result = client.uploadManifest(MANIFEST, null);
+ SetManifestResult result = client.setManifest(MANIFEST, null);
assertNotNull(result);
assertNotNull(result.getDigest());
- DownloadManifestResult downloadManifestResult = client.downloadManifest(result.getDigest());
- assertEquals(result.getDigest(), downloadManifestResult.getDigest());
- validateManifest(MANIFEST, downloadManifestResult.asOciManifest());
+ GetManifestResult getManifestResult = client.getManifest(result.getDigest());
+ assertEquals(result.getDigest(), getManifestResult.getDigest());
+ validateManifest(MANIFEST, getManifestResult.getManifest().toObject(OciImageManifest.class));
}
@ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
@MethodSource("getHttpClients")
public void canUploadOciManifestBinaryData(HttpClient httpClient) {
- client = getBlobClient("oci-artifact", httpClient);
- uploadManifestPrerequisites();
+ client = getContentClient("oci-artifact", httpClient);
+ setManifestPrerequisites();
- UploadManifestOptions options = new UploadManifestOptions(BinaryData.fromObject(MANIFEST), ManifestMediaType.OCI_MANIFEST);
- UploadManifestResult result = client.uploadManifestWithResponse(options, Context.NONE).getValue();
+ SetManifestOptions options = new SetManifestOptions(BinaryData.fromObject(MANIFEST), ManifestMediaType.OCI_MANIFEST);
+ SetManifestResult result = client.setManifestWithResponse(options, Context.NONE).getValue();
assertNotNull(result);
assertNotNull(result.getDigest());
- DownloadManifestResult downloadManifestResult = client.downloadManifest(MANIFEST_DIGEST);
- assertEquals(MANIFEST_DIGEST, downloadManifestResult.getDigest());
- validateManifest(MANIFEST, downloadManifestResult.getContent());
+ GetManifestResult getManifestResult = client.getManifest(MANIFEST_DIGEST);
+ assertEquals(MANIFEST_DIGEST, getManifestResult.getDigest());
+ validateManifest(MANIFEST, getManifestResult.getManifest());
}
@ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
@MethodSource("getHttpClients")
public void canUploadOciManifestViaOptions(HttpClient httpClient) {
- client = getBlobClient("oci-artifact", httpClient);
- uploadManifestPrerequisites();
+ client = getContentClient("oci-artifact", httpClient);
+ setManifestPrerequisites();
- UploadManifestResult result = client.uploadManifestWithResponse(new UploadManifestOptions(MANIFEST), Context.NONE).getValue();
+ SetManifestResult result = client.setManifestWithResponse(new SetManifestOptions(MANIFEST), Context.NONE).getValue();
assertNotNull(result);
assertNotNull(result.getDigest());
- DownloadManifestResult downloadManifestResult = client.downloadManifest(MANIFEST_DIGEST);
- assertEquals(MANIFEST_DIGEST, downloadManifestResult.getDigest());
- validateManifest(MANIFEST, downloadManifestResult.getContent());
- }
-
- @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
- @MethodSource("getHttpClients")
- public void canDownloadManifestWithListOfTypes(HttpClient httpClient) {
- client = getBlobClient("oci-artifact", httpClient);
- uploadManifestPrerequisites();
-
- UploadManifestResult result = client.uploadManifest(MANIFEST, null);
- assertNotNull(result);
- assertNotNull(result.getDigest());
-
- List manifestTypes = Arrays.asList(ManifestMediaType.DOCKER_MANIFEST,
- ManifestMediaType.OCI_MANIFEST,
- ManifestMediaType.fromString("application/vnd.docker.distribution.manifest.list.v2+json"),
- ManifestMediaType.fromString("application/vnd.oci.image.index.v1+json"));
-
- DownloadManifestResult downloadManifestResult = client.downloadManifestWithResponse(MANIFEST_DIGEST, manifestTypes, Context.NONE).getValue();
- assertEquals(MANIFEST_DIGEST, downloadManifestResult.getDigest());
- assertEquals(ManifestMediaType.OCI_MANIFEST, downloadManifestResult.getMediaType());
- validateManifest(MANIFEST, downloadManifestResult.getContent());
+ GetManifestResult getManifestResult = client.getManifest(MANIFEST_DIGEST);
+ assertEquals(MANIFEST_DIGEST, getManifestResult.getDigest());
+ validateManifest(MANIFEST, getManifestResult.getManifest());
}
@ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
@MethodSource("getHttpClients")
public void canUploadOciManifestWithTag(HttpClient httpClient) {
- client = getBlobClient("oci-artifact", httpClient);
+ client = getContentClient("oci-artifact", httpClient);
String tag = "v1";
- uploadManifestPrerequisites();
+ setManifestPrerequisites();
- UploadManifestResult result = client.uploadManifest(MANIFEST, tag);
+ SetManifestResult result = client.setManifest(MANIFEST, tag);
assertNotNull(result);
assertNotNull(result.getDigest());
- DownloadManifestResult downloadManifestResult = client.downloadManifest(MANIFEST_DIGEST);
- assertEquals(MANIFEST_DIGEST, downloadManifestResult.getDigest());
- validateManifest(MANIFEST, downloadManifestResult.asOciManifest());
+ GetManifestResult getManifestResult = client.getManifest(MANIFEST_DIGEST);
+ assertEquals(MANIFEST_DIGEST, getManifestResult.getDigest());
+ validateManifest(MANIFEST, getManifestResult.getManifest().toObject(OciImageManifest.class));
validateTag("oci-artifact", MANIFEST_DIGEST, tag, httpClient);
}
@@ -188,19 +166,19 @@ public void canUploadOciManifestWithTag(HttpClient httpClient) {
@ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
@MethodSource("getHttpClients")
public void canUploadDockerManifestWithTag(HttpClient httpClient) {
- client = getBlobClient("oci-artifact", httpClient);
+ client = getContentClient("oci-artifact", httpClient);
String tag = "v2";
- uploadManifestPrerequisites();
+ setManifestPrerequisites();
BinaryData dockerV2Manifest = BinaryData.fromObject(createDockerV2Manifest());
- UploadManifestOptions options = new UploadManifestOptions(dockerV2Manifest, ManifestMediaType.DOCKER_MANIFEST)
+ SetManifestOptions options = new SetManifestOptions(dockerV2Manifest, ManifestMediaType.DOCKER_MANIFEST)
.setTag(tag);
- UploadManifestResult result = client.uploadManifestWithResponse(options, Context.NONE).getValue();
+ SetManifestResult result = client.setManifestWithResponse(options, Context.NONE).getValue();
assertNotNull(result);
assertNotNull(result.getDigest());
- DownloadManifestResult downloadManifestResult = client.downloadManifest(tag);
- assertEquals(result.getDigest(), downloadManifestResult.getDigest());
+ GetManifestResult getManifestResult = client.getManifest(tag);
+ assertEquals(result.getDigest(), getManifestResult.getDigest());
validateTag("oci-artifact", result.getDigest(), tag, httpClient);
}
@@ -208,20 +186,20 @@ public void canUploadDockerManifestWithTag(HttpClient httpClient) {
@ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
@MethodSource("getHttpClients")
public void canUploadOciManifestAsync(HttpClient httpClient) {
- client = getBlobClient("oci-artifact", httpClient);
+ client = getContentClient("oci-artifact", httpClient);
asyncClient = getBlobAsyncClient("oci-artifact", httpClient);
- uploadManifestPrerequisites();
- StepVerifier.create(asyncClient.uploadManifest(MANIFEST, null)
+ setManifestPrerequisites();
+ StepVerifier.create(asyncClient.setManifest(MANIFEST, null)
.flatMap(result -> {
assertNotNull(result);
assertNotNull(result.getDigest());
- return asyncClient.downloadManifest(MANIFEST_DIGEST);
+ return asyncClient.getManifest(MANIFEST_DIGEST);
}))
- .assertNext(downloadManifestResult -> {
- assertEquals(MANIFEST_DIGEST, downloadManifestResult.getDigest());
- validateManifest(MANIFEST, downloadManifestResult.asOciManifest());
+ .assertNext(getManifestResult -> {
+ assertEquals(MANIFEST_DIGEST, getManifestResult.getDigest());
+ validateManifest(MANIFEST, getManifestResult.getManifest().toObject(OciImageManifest.class));
})
.verifyComplete();
}
@@ -229,22 +207,22 @@ public void canUploadOciManifestAsync(HttpClient httpClient) {
@ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
@MethodSource("getHttpClients")
public void canUploadDockerManifestWithTagAsync(HttpClient httpClient) {
- client = getBlobClient("oci-artifact", httpClient);
+ client = getContentClient("oci-artifact", httpClient);
asyncClient = getBlobAsyncClient("oci-artifact", httpClient);
String tag = "v2";
- uploadManifestPrerequisites();
+ setManifestPrerequisites();
BinaryData dockerV2Manifest = BinaryData.fromObject(createDockerV2Manifest());
String digest = computeDigest(dockerV2Manifest.toByteBuffer().asReadOnlyBuffer());
- UploadManifestOptions options = new UploadManifestOptions(dockerV2Manifest, ManifestMediaType.DOCKER_MANIFEST).setTag(tag);
- StepVerifier.create(asyncClient.uploadManifestWithResponse(options)
+ SetManifestOptions options = new SetManifestOptions(dockerV2Manifest, ManifestMediaType.DOCKER_MANIFEST).setTag(tag);
+ StepVerifier.create(asyncClient.setManifestWithResponse(options)
.flatMap(result -> {
assertNotNull(result);
assertNotNull(result.getValue().getDigest());
- return asyncClient.downloadManifest(tag);
+ return asyncClient.getManifest(tag);
}))
- .assertNext(downloadManifestResult -> assertEquals(digest, downloadManifestResult.getDigest()))
+ .assertNext(getManifestResult -> assertEquals(digest, getManifestResult.getDigest()))
.verifyComplete();
validateTag("oci-artifact", digest, tag, httpClient);
@@ -253,9 +231,9 @@ public void canUploadDockerManifestWithTagAsync(HttpClient httpClient) {
@ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
@MethodSource("getHttpClients")
public void canUploadBlob(HttpClient httpClient) {
- client = getBlobClient("oci-artifact", httpClient);
+ client = getContentClient("oci-artifact", httpClient);
- UploadBlobResult result = client.uploadBlob(CONFIG_DATA);
+ UploadRegistryBlobResult result = client.uploadBlob(CONFIG_DATA);
assertEquals(CONFIG_DIGEST, result.getDigest());
assertEquals(CONFIG_DATA.getLength(), result.getSizeInBytes());
@@ -266,11 +244,11 @@ public void canUploadBlob(HttpClient httpClient) {
public void canUploadHugeBlobInChunks(HttpClient httpClient) throws IOException {
assumeTrue(super.getTestMode() == TestMode.LIVE);
- client = getBlobClient("oci-artifact", httpClient);
+ client = getContentClient("oci-artifact", httpClient);
- long size = CHUNK_SIZE * 50;
+ long size = CHUNK_SIZE * 20;
TestInputStream input = new TestInputStream(size);
- UploadBlobResult result = client.uploadBlob(Channels.newChannel(input), Context.NONE);
+ UploadRegistryBlobResult result = client.uploadBlob(Channels.newChannel(input), Context.NONE);
TestOutputStream output = new TestOutputStream();
client.downloadStream(result.getDigest(), Channels.newChannel(output));
@@ -287,26 +265,24 @@ public void canUploadHugeBlobInChunksAsync(HttpClient httpClient) {
asyncClient = getBlobAsyncClient("oci-artifact", httpClient);
long size = CHUNK_SIZE * 50;
- final TestOutputStream output = new TestOutputStream();
+ AtomicLong download = new AtomicLong(0);
StepVerifier.setDefaultTimeout(Duration.ofMinutes(30));
- StepVerifier.create(BinaryData.fromFlux(generateAsyncStream(size))
- .flatMap(data -> asyncClient.uploadBlob(data))
- .flatMap(uploadBlobResult -> {
- assertEquals(size, uploadBlobResult.getSizeInBytes());
- return asyncClient.downloadStream(uploadBlobResult.getDigest());
- })
- .flatMap(downloadResult -> downloadResult.writeValueTo(Channels.newChannel(output))))
+ StepVerifier.create(asyncClient.uploadBlob(generateAsyncStream(size))
+ .flatMap(r -> asyncClient.downloadStream(r.getDigest()))
+ .flatMapMany(bd -> bd.toFluxByteBuffer())
+ .doOnNext(bb -> download.addAndGet(bb.remaining()))
+ .then())
.verifyComplete();
- assertEquals(size, output.getPosition());
+ assertEquals(size, download.get());
}
@ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
@MethodSource("getHttpClients")
public void downloadBlob(HttpClient httpClient) throws IOException {
BinaryData content = generateStream((int) (CHUNK_SIZE * 2.1d));
- client = getBlobClient("oci-artifact", httpClient);
- UploadBlobResult uploadResult = client.uploadBlob(content);
+ client = getContentClient("oci-artifact", httpClient);
+ UploadRegistryBlobResult uploadResult = client.uploadBlob(content);
ByteArrayOutputStream stream = new ByteArrayOutputStream();
client.downloadStream(uploadResult.getDigest(), Channels.newChannel(stream));
@@ -318,8 +294,8 @@ public void downloadBlob(HttpClient httpClient) throws IOException {
@MethodSource("getHttpClients")
public void downloadSmallBlob(HttpClient httpClient) throws IOException {
BinaryData content = generateStream(CHUNK_SIZE - 1);
- client = getBlobClient("oci-artifact", httpClient);
- UploadBlobResult uploadResult = client.uploadBlob(content);
+ client = getContentClient("oci-artifact", httpClient);
+ UploadRegistryBlobResult uploadResult = client.uploadBlob(content);
ByteArrayOutputStream stream = new ByteArrayOutputStream();
client.downloadStream(uploadResult.getDigest(), Channels.newChannel(stream));
@@ -341,7 +317,7 @@ public void downloadBlobAsync(HttpClient httpClient) throws IOException {
assertEquals(digest, uploadResult.getDigest());
return asyncClient.downloadStream(uploadResult.getDigest());
})
- .flatMap(r -> r.writeValueTo(Channels.newChannel(stream))))
+ .flatMap(r -> FluxUtil.writeToOutputStream(r.toFluxByteBuffer(), stream)))
.verifyComplete();
stream.flush();
@@ -362,7 +338,7 @@ public void downloadSmallBlobAsync(HttpClient httpClient) throws IOException {
assertEquals(digest, uploadResult.getDigest());
return asyncClient.downloadStream(uploadResult.getDigest());
})
- .flatMap(r -> r.writeValueTo(Channels.newChannel(stream))))
+ .flatMap(r -> FluxUtil.writeToOutputStream(r.toFluxByteBuffer(), stream)))
.verifyComplete();
stream.flush();
@@ -371,52 +347,30 @@ public void downloadSmallBlobAsync(HttpClient httpClient) throws IOException {
@ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
@MethodSource("getHttpClients")
- public void downloadManifest(HttpClient httpClient) {
- client = getBlobClient("oci-artifact", httpClient);
- uploadManifestPrerequisites();
-
- UploadManifestResult result = client.uploadManifest(MANIFEST, "latest");
- DownloadManifestResult downloadResult = client.downloadManifest(result.getDigest());
- assertNotNull(downloadResult.asOciManifest());
- validateManifest(MANIFEST, downloadResult.asOciManifest());
+ public void getManifest(HttpClient httpClient) {
+ client = getContentClient("oci-artifact", httpClient);
+ setManifestPrerequisites();
- downloadResult = client.downloadManifest("latest");
- assertNotNull(downloadResult.asOciManifest());
- validateManifest(MANIFEST, downloadResult.asOciManifest());
- }
+ SetManifestResult result = client.setManifest(MANIFEST, "latest");
+ GetManifestResult downloadResult = client.getManifest(result.getDigest());
+ assertNotNull(downloadResult.getManifest().toObject(OciImageManifest.class));
+ validateManifest(MANIFEST, downloadResult.getManifest().toObject(OciImageManifest.class));
- @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
- @MethodSource("getHttpClients")
- public void downloadManifestAsync(HttpClient httpClient) {
- asyncClient = getBlobAsyncClient("oci-artifact", httpClient);
- StepVerifier.create(
- uploadManifestPrerequisitesAsync()
- .then(asyncClient.uploadManifest(MANIFEST, null))
- .flatMap(result -> asyncClient.downloadManifest(result.getDigest())))
- .assertNext(downloadResult -> {
- OciImageManifest returnedManifest = downloadResult.asOciManifest();
- assertNotNull(returnedManifest);
- validateManifest(MANIFEST, returnedManifest);
- })
- .verifyComplete();
+ downloadResult = client.getManifest("latest");
+ assertNotNull(downloadResult.getManifest().toObject(OciImageManifest.class));
+ validateManifest(MANIFEST, downloadResult.getManifest().toObject(OciImageManifest.class));
}
@ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
@MethodSource("getHttpClients")
- public void downloadManifestWithListOfTypesAsync(HttpClient httpClient) {
- List manifestTypes = Arrays.asList(ManifestMediaType.DOCKER_MANIFEST,
- ManifestMediaType.OCI_MANIFEST,
- ManifestMediaType.fromString("application/vnd.docker.distribution.manifest.list.v2+json"),
- ManifestMediaType.fromString("application/vnd.oci.image.index.v1+json"));
-
+ public void getManifestAsync(HttpClient httpClient) {
asyncClient = getBlobAsyncClient("oci-artifact", httpClient);
StepVerifier.create(
- uploadManifestPrerequisitesAsync()
- .then(asyncClient.uploadManifest(MANIFEST, null))
- .flatMap(result -> asyncClient.downloadManifestWithResponse(result.getDigest(), manifestTypes))
- .map(response -> response.getValue()))
+ setManifestPrerequisitesAsync()
+ .then(asyncClient.setManifest(MANIFEST, null))
+ .flatMap(result -> asyncClient.getManifest(result.getDigest())))
.assertNext(downloadResult -> {
- OciImageManifest returnedManifest = downloadResult.asOciManifest();
+ OciImageManifest returnedManifest = downloadResult.getManifest().toObject(OciImageManifest.class);
assertNotNull(returnedManifest);
validateManifest(MANIFEST, returnedManifest);
})
@@ -425,17 +379,14 @@ public void downloadManifestWithListOfTypesAsync(HttpClient httpClient) {
@ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
@MethodSource("getHttpClients")
- public void downloadManifestListManifest(HttpClient httpClient) {
- client = getBlobClient(HELLO_WORLD_REPOSITORY_NAME, httpClient);
+ public void getManifestListManifest(HttpClient httpClient) {
+ client = getContentClient(HELLO_WORLD_REPOSITORY_NAME, httpClient);
ManifestMediaType dockerListType = ManifestMediaType.fromString("application/vnd.docker.distribution.manifest.list.v2+json");
- Response manifestResult = client.downloadManifestWithResponse("latest", Collections.singletonList(dockerListType), Context.NONE);
+ Response manifestResult = client.getManifestWithResponse("latest", Context.NONE);
assertNotNull(manifestResult.getValue());
- assertEquals(dockerListType, manifestResult.getValue().getMediaType());
-
- assertThrows(IllegalStateException.class, () -> manifestResult.getValue().asOciManifest());
+ assertEquals(dockerListType, manifestResult.getValue().getManifestMediaType());
- // does not throw
- ManifestList list = manifestResult.getValue().getContent().toObject(ManifestList.class);
+ ManifestList list = manifestResult.getValue().getManifest().toObject(ManifestList.class);
assertEquals(2, list.getSchemaVersion());
assertEquals(dockerListType.toString(), list.getMediaType());
assertEquals(11, list.getManifests().size());
@@ -443,41 +394,40 @@ public void downloadManifestListManifest(HttpClient httpClient) {
@ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
@MethodSource("getHttpClients")
- public void downloadManifestIncompatibleType(HttpClient httpClient) {
- client = getBlobClient(HELLO_WORLD_REPOSITORY_NAME, httpClient);
- ManifestMediaType dockerV1 = ManifestMediaType.fromString("application/vnd.docker.distribution.manifest.v1+json");
+ public void getManifestIncompatibleType(HttpClient httpClient) {
+ client = getContentClient(HELLO_WORLD_REPOSITORY_NAME, httpClient);
+ ManifestMediaType ociArtifactType = ManifestMediaType.fromString("application/vnd.oci.artifact.manifest.v1+json");
- assertThrows(ServiceResponseException.class, () -> client.downloadManifestWithResponse("latest",
- Collections.singletonList(dockerV1), Context.NONE));
+ BinaryData ociArtifact = BinaryData.fromString("{\"mediaType\": \"application/vnd.oci.artifact.manifest.v1+json\",\"artifactType\": \"application/vnd.example.sbom.v1\"}");
+ SetManifestResult result = client.setManifestWithResponse(new SetManifestOptions(ociArtifact, ociArtifactType), Context.NONE)
+ .getValue();
+ assertThrows(ResourceNotFoundException.class, () -> client.getManifestWithResponse(result.getDigest(), Context.NONE));
}
@ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
@MethodSource("getHttpClients")
- public void downloadManifestDifferentType(HttpClient httpClient) {
- client = getBlobClient(HELLO_WORLD_REPOSITORY_NAME, httpClient);
+ public void getManifestDifferentType(HttpClient httpClient) {
+ client = getContentClient(HELLO_WORLD_REPOSITORY_NAME, httpClient);
// the original content there is docker v2 manifest list
- Response manifestResult = client.downloadManifestWithResponse("latest",
- Collections.singletonList(ManifestMediaType.DOCKER_MANIFEST), Context.NONE);
+ GetManifestResult manifestResult = client.getManifest("latest");
// but service does the best effort to return what it supports
- OciImageManifest manifest = manifestResult.getValue().asOciManifest();
- assertEquals(1, manifest.getLayers().size());
- assertEquals("application/vnd.docker.image.rootfs.diff.tar.gzip", manifest.getLayers().get(0).getMediaType());
+ assertEquals("application/vnd.docker.distribution.manifest.list.v2+json", manifestResult.getManifestMediaType().toString());
}
@ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
@MethodSource("getHttpClients")
- public void downloadManifestListManifestAsync(HttpClient httpClient) {
+ public void getManifestListManifestAsync(HttpClient httpClient) {
asyncClient = getBlobAsyncClient(HELLO_WORLD_REPOSITORY_NAME, httpClient);
ManifestMediaType dockerListType = ManifestMediaType.fromString("application/vnd.docker.distribution.manifest.list.v2+json");
- StepVerifier.create(asyncClient.downloadManifestWithResponse("latest", Collections.singletonList(dockerListType)))
+ StepVerifier.create(asyncClient.getManifestWithResponse("latest"))
.assertNext(manifestResult -> {
assertNotNull(manifestResult.getValue());
- assertEquals(dockerListType, manifestResult.getValue().getMediaType());
+ assertEquals(dockerListType, manifestResult.getValue().getManifestMediaType());
// does not throw
- ManifestList list = manifestResult.getValue().getContent().toObject(ManifestList.class);
+ ManifestList list = manifestResult.getValue().getManifest().toObject(ManifestList.class);
assertEquals(2, list.getSchemaVersion());
assertEquals(dockerListType.toString(), list.getMediaType());
assertEquals(11, list.getManifests().size());
@@ -508,12 +458,12 @@ private void cleanupResources() {
}
}
- private void uploadManifestPrerequisites() {
+ private void setManifestPrerequisites() {
client.uploadBlob(CONFIG_DATA);
client.uploadBlob(LAYER_DATA);
}
- private Mono uploadManifestPrerequisitesAsync() {
+ private Mono setManifestPrerequisitesAsync() {
return asyncClient.uploadBlob(CONFIG_DATA)
.then(asyncClient.uploadBlob(LAYER_DATA))
.then();
@@ -547,9 +497,9 @@ private void validateManifest(OciImageManifest originalManifest, BinaryData retu
private void validateManifest(OciImageManifest originalManifest, OciImageManifest returnedManifest) {
assertNotNull(originalManifest);
assertNotNull(returnedManifest);
- assertNotNull(returnedManifest.getConfig());
- assertEquals(originalManifest.getConfig().getMediaType(), returnedManifest.getConfig().getMediaType());
- assertEquals(originalManifest.getConfig().getSizeInBytes(), returnedManifest.getConfig().getSizeInBytes());
+ assertNotNull(returnedManifest.getConfiguration());
+ assertEquals(originalManifest.getConfiguration().getMediaType(), returnedManifest.getConfiguration().getMediaType());
+ assertEquals(originalManifest.getConfiguration().getSizeInBytes(), returnedManifest.getConfiguration().getSizeInBytes());
assertNotNull(returnedManifest.getLayers());
assertEquals(originalManifest.getLayers().size(), returnedManifest.getLayers().size());
for (int i = 0; i < originalManifest.getLayers().size(); i++) {
@@ -559,12 +509,12 @@ private void validateManifest(OciImageManifest originalManifest, OciImageManifes
}
}
- private ContainerRegistryBlobClient getBlobClient(String repositoryName, HttpClient httpClient) {
- return getBlobClientBuilder(repositoryName, buildSyncAssertingClient(httpClient == null ? interceptorManager.getPlaybackClient() : httpClient)).buildClient();
+ private ContainerRegistryContentClient getContentClient(String repositoryName, HttpClient httpClient) {
+ return getContentClientBuilder(repositoryName, buildSyncAssertingClient(httpClient == null ? interceptorManager.getPlaybackClient() : httpClient)).buildClient();
}
- private ContainerRegistryBlobAsyncClient getBlobAsyncClient(String repositoryName, HttpClient httpClient) {
- return getBlobClientBuilder(repositoryName, httpClient).buildAsyncClient();
+ private ContainerRegistryContentAsyncClient getBlobAsyncClient(String repositoryName, HttpClient httpClient) {
+ return getContentClientBuilder(repositoryName, httpClient).buildAsyncClient();
}
private static BinaryData generateStream(int size) {
@@ -588,7 +538,6 @@ private static Flux generateAsyncStream(long size) {
buffer.limit((int) remaining);
}
sink.next(buffer);
-
return pos + CHUNK.length;
});
}
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/java/com/azure/containers/containerregistry/ContainerRegistryBlobClientTests.java b/sdk/containerregistry/azure-containers-containerregistry/src/test/java/com/azure/containers/containerregistry/ContainerRegistryContentClientTests.java
similarity index 66%
rename from sdk/containerregistry/azure-containers-containerregistry/src/test/java/com/azure/containers/containerregistry/ContainerRegistryBlobClientTests.java
rename to sdk/containerregistry/azure-containers-containerregistry/src/test/java/com/azure/containers/containerregistry/ContainerRegistryContentClientTests.java
index 7c02a03b6cf8d..f18b919b5bbad 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/test/java/com/azure/containers/containerregistry/ContainerRegistryBlobClientTests.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/test/java/com/azure/containers/containerregistry/ContainerRegistryContentClientTests.java
@@ -4,11 +4,9 @@
package com.azure.containers.containerregistry;
import com.azure.containers.containerregistry.implementation.UtilsImpl;
-import com.azure.containers.containerregistry.models.DownloadManifestResult;
+import com.azure.containers.containerregistry.models.GetManifestResult;
import com.azure.containers.containerregistry.models.ManifestMediaType;
-import com.azure.containers.containerregistry.specialized.ContainerRegistryBlobAsyncClient;
-import com.azure.containers.containerregistry.specialized.ContainerRegistryBlobClient;
-import com.azure.containers.containerregistry.specialized.ContainerRegistryBlobClientBuilder;
+import com.azure.containers.containerregistry.models.OciImageManifest;
import com.azure.core.exception.ServiceResponseException;
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpHeaderName;
@@ -23,7 +21,7 @@
import com.azure.core.test.http.MockHttpResponse;
import com.azure.core.util.BinaryData;
import com.azure.core.util.Context;
-import com.azure.core.util.io.IOUtils;
+import com.azure.core.util.FluxUtil;
import com.fasterxml.jackson.databind.util.ByteBufferBackedInputStream;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -33,13 +31,13 @@
import java.io.ByteArrayOutputStream;
import java.io.File;
+import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.Buffer;
import java.nio.ByteBuffer;
-import java.nio.channels.AsynchronousFileChannel;
import java.nio.channels.Channels;
import java.nio.channels.WritableByteChannel;
import java.nio.charset.StandardCharsets;
@@ -48,10 +46,7 @@
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
import java.util.Random;
-import java.util.concurrent.ExecutionException;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import java.util.function.Function;
@@ -70,10 +65,11 @@
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.fail;
-public class ContainerRegistryBlobClientTests {
+public class ContainerRegistryContentClientTests {
private static final BinaryData SMALL_CONTENT = BinaryData.fromString("foobar");
private static final String SMALL_CONTENT_SHA256 = "sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2";
- private static final String DEFAULT_MANIFEST_CONTENT_TYPE = ManifestMediaType.OCI_MANIFEST + "," + ManifestMediaType.DOCKER_MANIFEST;
+ private static final String DEFAULT_MANIFEST_CONTENT_TYPE = "*/*," + ManifestMediaType.OCI_MANIFEST + "," + ManifestMediaType.DOCKER_MANIFEST + ",application/vnd.oci.image.index.v1+json"
+ + ",application/vnd.docker.distribution.manifest.list.v2+json,application/vnd.cncf.oras.artifact.manifest.v1+json";
private static final BinaryData MANIFEST_DATA = BinaryData.fromObject(MANIFEST);
private static final BinaryData OCI_INDEX = BinaryData.fromString("{\"schemaVersion\":2,\"mediaType\":\"application/vnd.oci.image.index.v1+json\","
@@ -102,7 +98,7 @@ void beforeEach() {
@Test
public void downloadBlobWrongDigestInHeaderSync() {
- ContainerRegistryBlobClient client = createSyncClient(createDownloadBlobClient(SMALL_CONTENT, DIGEST_UNKNOWN));
+ ContainerRegistryContentClient client = createSyncClient(createDownloadContentClient(SMALL_CONTENT, DIGEST_UNKNOWN));
ByteArrayOutputStream stream = new ByteArrayOutputStream();
assertThrows(ServiceResponseException.class, () -> client.downloadStream("some-digest", Channels.newChannel(stream)));
@@ -110,118 +106,113 @@ public void downloadBlobWrongDigestInHeaderSync() {
@Test
public void downloadManigestWrongDigestInHeaderSync() {
- ContainerRegistryBlobClient client = createSyncClient(createClientManifests(MANIFEST_DATA, DIGEST_UNKNOWN, null));
- assertThrows(ServiceResponseException.class, () -> client.downloadManifest("latest"));
+ ContainerRegistryContentClient client = createSyncClient(createClientManifests(MANIFEST_DATA, DIGEST_UNKNOWN, null));
+ assertThrows(ServiceResponseException.class, () -> client.getManifest("latest"));
}
@Test
public void downloadBlobWrongDigestInHeaderAsync() {
- ContainerRegistryBlobAsyncClient asyncClient = createAsyncClient(createDownloadBlobClient(SMALL_CONTENT, DIGEST_UNKNOWN));
+ ContainerRegistryContentAsyncClient asyncClient = createAsyncClient(createDownloadContentClient(SMALL_CONTENT, DIGEST_UNKNOWN));
ByteArrayOutputStream stream = new ByteArrayOutputStream();
StepVerifier.create(asyncClient.downloadStream("some-digest")
- .flatMap(response -> response.writeValueTo(Channels.newChannel(stream))))
+ .flatMap(response -> FluxUtil.writeToOutputStream(response.toFluxByteBuffer(), stream)))
.expectError(ServiceResponseException.class)
.verify();
}
@Test
- public void downloadManifestWrongDigestInHeaderAsync() {
- ContainerRegistryBlobAsyncClient asyncClient = createAsyncClient(createClientManifests(MANIFEST_DATA, DIGEST_UNKNOWN, null));
+ public void getManifestWrongDigestInHeaderAsync() {
+ ContainerRegistryContentAsyncClient asyncClient = createAsyncClient(createClientManifests(MANIFEST_DATA, DIGEST_UNKNOWN, null));
- StepVerifier.create(asyncClient.downloadManifest("latest"))
+ StepVerifier.create(asyncClient.getManifest("latest"))
.expectError(ServiceResponseException.class)
.verify();
}
@Test
public void downloadBlobWrongResponseSync() {
- ContainerRegistryBlobClient client = createSyncClient(createDownloadBlobClient(SMALL_CONTENT, DIGEST_UNKNOWN));
+ ContainerRegistryContentClient client = createSyncClient(createDownloadContentClient(SMALL_CONTENT, DIGEST_UNKNOWN));
ByteArrayOutputStream stream = new ByteArrayOutputStream();
assertThrows(ServiceResponseException.class, () -> client.downloadStream(SMALL_CONTENT_SHA256, Channels.newChannel(stream)));
}
@Test
- public void downloadManifestWrongResponseSync() {
- ContainerRegistryBlobClient client = createSyncClient(createClientManifests(MANIFEST_DATA, DIGEST_UNKNOWN, null));
- assertThrows(ServiceResponseException.class, () -> client.downloadManifest("latest"));
+ public void getManifestWrongResponseSync() {
+ ContainerRegistryContentClient client = createSyncClient(createClientManifests(MANIFEST_DATA, DIGEST_UNKNOWN, null));
+ assertThrows(ServiceResponseException.class, () -> client.getManifest("latest"));
}
@Test
public void downloadBlobWrongResponseAsync() {
- ContainerRegistryBlobAsyncClient asyncClient = createAsyncClient(createDownloadBlobClient(SMALL_CONTENT, DIGEST_UNKNOWN));
+ ContainerRegistryContentAsyncClient asyncClient = createAsyncClient(createDownloadContentClient(SMALL_CONTENT, DIGEST_UNKNOWN));
ByteArrayOutputStream stream = new ByteArrayOutputStream();
StepVerifier.create(asyncClient.downloadStream(SMALL_CONTENT_SHA256)
- .flatMap(response -> response.writeValueTo(Channels.newChannel(stream))))
+ .flatMap(response -> FluxUtil.writeToOutputStream(response.toFluxByteBuffer(), stream)))
.expectError(ServiceResponseException.class)
.verify();
}
@Test
- public void downloadManifestWrongResponseAsync() {
- ContainerRegistryBlobAsyncClient asyncClient = createAsyncClient(createClientManifests(MANIFEST_DATA, DIGEST_UNKNOWN, null));
- StepVerifier.create(asyncClient.downloadManifest("latest"))
+ public void getManifestWrongResponseAsync() {
+ ContainerRegistryContentAsyncClient asyncClient = createAsyncClient(createClientManifests(MANIFEST_DATA, DIGEST_UNKNOWN, null));
+ StepVerifier.create(asyncClient.getManifest("latest"))
.expectError(ServiceResponseException.class)
.verify();
}
@SyncAsyncTest
- public void downloadManifest() {
- ContainerRegistryBlobClient client = createSyncClient(createClientManifests(MANIFEST_DATA, MANIFEST_DIGEST, null));
- ContainerRegistryBlobAsyncClient asyncClient = createAsyncClient(createClientManifests(MANIFEST_DATA, MANIFEST_DIGEST, null));
+ public void getManifest() {
+ ContainerRegistryContentClient client = createSyncClient(createClientManifests(MANIFEST_DATA, MANIFEST_DIGEST, null));
+ ContainerRegistryContentAsyncClient asyncClient = createAsyncClient(createClientManifests(MANIFEST_DATA, MANIFEST_DIGEST, null));
- DownloadManifestResult result = SyncAsyncExtension.execute(
- () -> client.downloadManifest(MANIFEST_DIGEST),
- () -> asyncClient.downloadManifest(MANIFEST_DIGEST));
+ GetManifestResult result = SyncAsyncExtension.execute(
+ () -> client.getManifest(MANIFEST_DIGEST),
+ () -> asyncClient.getManifest(MANIFEST_DIGEST));
- assertArrayEquals(MANIFEST_DATA.toBytes(), result.getContent().toBytes());
- assertNotNull(result.asOciManifest());
- assertEquals(ManifestMediaType.OCI_MANIFEST, result.getMediaType());
+ assertArrayEquals(MANIFEST_DATA.toBytes(), result.getManifest().toBytes());
+ assertNotNull(result.getManifest().toObject(ManifestMediaType.class));
+ assertEquals(ManifestMediaType.OCI_MANIFEST, result.getManifestMediaType());
}
@SyncAsyncTest
- public void downloadManifestWithDockerType() {
- ContainerRegistryBlobClient client = createSyncClient(createClientManifests(MANIFEST_DATA, MANIFEST_DIGEST, ManifestMediaType.DOCKER_MANIFEST));
- ContainerRegistryBlobAsyncClient asyncClient = createAsyncClient(createClientManifests(MANIFEST_DATA, MANIFEST_DIGEST, ManifestMediaType.DOCKER_MANIFEST));
+ public void getManifestWithDockerType() {
+ ContainerRegistryContentClient client = createSyncClient(createClientManifests(MANIFEST_DATA, MANIFEST_DIGEST, ManifestMediaType.DOCKER_MANIFEST));
+ ContainerRegistryContentAsyncClient asyncClient = createAsyncClient(createClientManifests(MANIFEST_DATA, MANIFEST_DIGEST, ManifestMediaType.DOCKER_MANIFEST));
- Collection dockerType = Collections.singletonList(ManifestMediaType.DOCKER_MANIFEST);
- Response result = SyncAsyncExtension.execute(
- () -> client.downloadManifestWithResponse(MANIFEST_DIGEST, dockerType, Context.NONE),
- () -> asyncClient.downloadManifestWithResponse(MANIFEST_DIGEST, dockerType));
+ Response result = SyncAsyncExtension.execute(
+ () -> client.getManifestWithResponse(MANIFEST_DIGEST, Context.NONE),
+ () -> asyncClient.getManifestWithResponse(MANIFEST_DIGEST));
- assertArrayEquals(MANIFEST_DATA.toBytes(), result.getValue().getContent().toBytes());
- assertNotNull(result.getValue().asOciManifest());
- assertEquals(ManifestMediaType.DOCKER_MANIFEST, result.getValue().getMediaType());
+ assertArrayEquals(MANIFEST_DATA.toBytes(), result.getValue().getManifest().toBytes());
+ assertNotNull(result.getValue().getManifest().toObject(OciImageManifest.class));
+ assertEquals(ManifestMediaType.DOCKER_MANIFEST, result.getValue().getManifestMediaType());
}
@SyncAsyncTest
- public void downloadManifestWithOciIndexType() {
- ContainerRegistryBlobClient client = createSyncClient(createClientManifests(OCI_INDEX, OCI_INDEX_DIGEST, OCI_INDEX_MEDIA_TYPE));
- ContainerRegistryBlobAsyncClient asyncClient = createAsyncClient(createClientManifests(OCI_INDEX, OCI_INDEX_DIGEST, OCI_INDEX_MEDIA_TYPE));
+ public void getManifestWithOciIndexType() {
+ ContainerRegistryContentClient client = createSyncClient(createClientManifests(OCI_INDEX, OCI_INDEX_DIGEST, OCI_INDEX_MEDIA_TYPE));
+ ContainerRegistryContentAsyncClient asyncClient = createAsyncClient(createClientManifests(OCI_INDEX, OCI_INDEX_DIGEST, OCI_INDEX_MEDIA_TYPE));
- Collection ociIndexType = Collections.singletonList(OCI_INDEX_MEDIA_TYPE);
- Response result = SyncAsyncExtension.execute(
- () -> client.downloadManifestWithResponse(OCI_INDEX_DIGEST, ociIndexType, Context.NONE),
- () -> asyncClient.downloadManifestWithResponse(OCI_INDEX_DIGEST, ociIndexType));
+ Response result = SyncAsyncExtension.execute(
+ () -> client.getManifestWithResponse(OCI_INDEX_DIGEST, Context.NONE),
+ () -> asyncClient.getManifestWithResponse(OCI_INDEX_DIGEST));
- assertArrayEquals(OCI_INDEX.toBytes(), result.getValue().getContent().toBytes());
- assertEquals(OCI_INDEX_MEDIA_TYPE, result.getValue().getMediaType());
-
- assertThrows(IllegalStateException.class, () -> result.getValue().asOciManifest());
+ assertArrayEquals(OCI_INDEX.toBytes(), result.getValue().getManifest().toBytes());
+ assertEquals(OCI_INDEX_MEDIA_TYPE, result.getValue().getManifestMediaType());
}
@SyncAsyncTest
public void downloadBlobOneChunk() throws IOException {
- ContainerRegistryBlobClient client = createSyncClient(createDownloadBlobClient(SMALL_CONTENT, SMALL_CONTENT_SHA256));
- ContainerRegistryBlobAsyncClient asyncClient = createAsyncClient(createDownloadBlobClient(SMALL_CONTENT, SMALL_CONTENT_SHA256));
+ ContainerRegistryContentClient client = createSyncClient(createDownloadContentClient(SMALL_CONTENT, SMALL_CONTENT_SHA256));
+ ContainerRegistryContentAsyncClient asyncClient = createAsyncClient(createDownloadContentClient(SMALL_CONTENT, SMALL_CONTENT_SHA256));
ByteArrayOutputStream stream = new ByteArrayOutputStream();
- WritableByteChannel channel = Channels.newChannel(stream);
SyncAsyncExtension.execute(
() -> client.downloadStream(SMALL_CONTENT_SHA256, Channels.newChannel(stream)),
() -> asyncClient.downloadStream(SMALL_CONTENT_SHA256)
- .flatMap(result -> result.writeValueTo(channel)));
+ .flatMap(result -> FluxUtil.writeToOutputStream(result.toFluxByteBuffer(), stream)));
stream.flush();
assertArrayEquals(SMALL_CONTENT.toBytes(), stream.toByteArray());
}
@@ -231,15 +222,15 @@ public void downloadBlobMultipleChunks() throws IOException {
BinaryData content = getDataSync((int) (CHUNK_SIZE * 2.3), sha256);
String expectedDigest = "sha256:" + bytesToHexString(sha256.digest());
- ContainerRegistryBlobClient client = createSyncClient(createDownloadBlobClient(content, expectedDigest));
- ContainerRegistryBlobAsyncClient asyncClient = createAsyncClient(createDownloadBlobClient(content, expectedDigest));
+ ContainerRegistryContentClient client = createSyncClient(createDownloadContentClient(content, expectedDigest));
+ ContainerRegistryContentAsyncClient asyncClient = createAsyncClient(createDownloadContentClient(content, expectedDigest));
ByteArrayOutputStream stream = new ByteArrayOutputStream();
WritableByteChannel channel = Channels.newChannel(stream);
SyncAsyncExtension.execute(
() -> client.downloadStream(expectedDigest, Channels.newChannel(stream)),
() -> asyncClient.downloadStream(expectedDigest)
- .flatMap(result -> result.writeValueTo(channel)));
+ .flatMap(result -> FluxUtil.writeToWritableByteChannel(result.toFluxByteBuffer(), channel)));
stream.flush();
assertArrayEquals(content.toBytes(), stream.toByteArray());
}
@@ -249,8 +240,8 @@ public void uploadBlobSmall() {
BinaryData content = getDataSync((int) (CHUNK_SIZE * 0.1), sha256);
Supplier calculateDigest = () -> "sha256:" + bytesToHexString(sha256.digest());
- ContainerRegistryBlobClient client = createSyncClient(createUploadBlobClient(calculateDigest));
- ContainerRegistryBlobAsyncClient asyncClient = createAsyncClient(createUploadBlobClient(calculateDigest));
+ ContainerRegistryContentClient client = createSyncClient(createUploadContentClient(calculateDigest));
+ ContainerRegistryContentAsyncClient asyncClient = createAsyncClient(createUploadContentClient(calculateDigest));
SyncAsyncExtension.execute(
() -> client.uploadBlob(content),
() -> asyncClient.uploadBlob(content));
@@ -261,8 +252,8 @@ public void uploadBlobSmallChunks() {
Flux content = getDataAsync(CHUNK_SIZE * 2, CHUNK_SIZE / 10, sha256);
Supplier calculateDigest = () -> "sha256:" + bytesToHexString(sha256.digest());
- ContainerRegistryBlobClient client = createSyncClient(createUploadBlobClient(calculateDigest));
- ContainerRegistryBlobAsyncClient asyncClient = createAsyncClient(createUploadBlobClient(calculateDigest));
+ ContainerRegistryContentClient client = createSyncClient(createUploadContentClient(calculateDigest));
+ ContainerRegistryContentAsyncClient asyncClient = createAsyncClient(createUploadContentClient(calculateDigest));
SyncAsyncExtension.execute(
() -> client.uploadBlob(BinaryData.fromFlux(content).block()),
() -> asyncClient.uploadBlob(content));
@@ -273,8 +264,8 @@ public void uploadBlobBigChunks() {
Flux content = getDataAsync(CHUNK_SIZE * 2, (int) (CHUNK_SIZE * 1.5), sha256);
Supplier calculateDigest = () -> "sha256:" + bytesToHexString(sha256.digest());
- ContainerRegistryBlobClient client = createSyncClient(createUploadBlobClient(calculateDigest));
- ContainerRegistryBlobAsyncClient asyncClient = createAsyncClient(createUploadBlobClient(calculateDigest));
+ ContainerRegistryContentClient client = createSyncClient(createUploadContentClient(calculateDigest));
+ ContainerRegistryContentAsyncClient asyncClient = createAsyncClient(createUploadContentClient(calculateDigest));
SyncAsyncExtension.execute(
() -> client.uploadBlob(BinaryData.fromFlux(content).block()),
() -> asyncClient.uploadBlob(content));
@@ -300,7 +291,7 @@ public void uploadVariableChunkSize() {
sha256.update(full.asReadOnlyBuffer());
Supplier calculateDigest = () -> "sha256:" + bytesToHexString(sha256.digest());
- ContainerRegistryBlobAsyncClient asyncClient = createAsyncClient(createUploadBlobClient(calculateDigest));
+ ContainerRegistryContentAsyncClient asyncClient = createAsyncClient(createUploadContentClient(calculateDigest));
StepVerifier.create(asyncClient.uploadBlob(content))
.expectNextCount(1)
.verifyComplete();
@@ -316,8 +307,8 @@ public void uploadFailWhileReadingInput() {
sink.error(new IllegalStateException("foo"));
});
- ContainerRegistryBlobClient client = createSyncClient(createUploadBlobClient(() -> "foo"));
- ContainerRegistryBlobAsyncClient asyncClient = createAsyncClient(createUploadBlobClient(() -> "foo"));
+ ContainerRegistryContentClient client = createSyncClient(createUploadContentClient(() -> "foo"));
+ ContainerRegistryContentAsyncClient asyncClient = createAsyncClient(createUploadContentClient(() -> "foo"));
assertThrows(IllegalStateException.class, () -> client.uploadBlob(BinaryData.fromFlux(content).block()));
StepVerifier.create(asyncClient.uploadBlob(content))
@@ -337,7 +328,7 @@ public void uploadFromFile() throws IOException {
Supplier calculateDigest = () -> "sha256:" + bytesToHexString(sha256.digest());
- ContainerRegistryBlobAsyncClient asyncClient = createAsyncClient(createUploadBlobClient(calculateDigest));
+ ContainerRegistryContentAsyncClient asyncClient = createAsyncClient(createUploadContentClient(calculateDigest));
StepVerifier.create(asyncClient.uploadBlob(BinaryData.fromFile(input.toPath())))
.expectNextCount(1)
@@ -351,8 +342,8 @@ public void uploadFromStream() throws IOException {
try (ByteBufferBackedInputStream stream = new ByteBufferBackedInputStream(data)) {
Supplier calculateDigest = () -> "sha256:" + bytesToHexString(sha256.digest());
- ContainerRegistryBlobClient client = createSyncClient(createUploadBlobClient(calculateDigest));
- ContainerRegistryBlobAsyncClient asyncClient = createAsyncClient(createUploadBlobClient(calculateDigest));
+ ContainerRegistryContentClient client = createSyncClient(createUploadContentClient(calculateDigest));
+ ContainerRegistryContentAsyncClient asyncClient = createAsyncClient(createUploadContentClient(calculateDigest));
SyncAsyncExtension.execute(
() -> client.uploadBlob(BinaryData.fromStream(stream)),
() -> asyncClient.uploadBlob(BinaryData.fromStream(stream)));
@@ -360,26 +351,20 @@ public void uploadFromStream() throws IOException {
}
@Test
- public void downloadToFile() throws IOException, InterruptedException, ExecutionException {
+ public void downloadToFile() throws IOException {
File output = File.createTempFile("temp", "in");
-
- ContainerRegistryBlobAsyncClient asyncClient = createAsyncClient(createDownloadBlobClient(SMALL_CONTENT, SMALL_CONTENT_SHA256));
- try (AsynchronousFileChannel outputChannel = AsynchronousFileChannel
- .open(output.toPath(), StandardOpenOption.CREATE, StandardOpenOption.WRITE, StandardOpenOption.READ)) {
+ ContainerRegistryContentAsyncClient asyncClient = createAsyncClient(createDownloadContentClient(SMALL_CONTENT, SMALL_CONTENT_SHA256));
+ try (FileOutputStream outputStream = new FileOutputStream(output)) {
StepVerifier.create(asyncClient.downloadStream(SMALL_CONTENT_SHA256)
- .flatMap(result -> result.writeValueToAsync(IOUtils.toAsynchronousByteChannel(outputChannel, 0))))
+ .flatMap(result -> FluxUtil.writeToOutputStream(result.toFluxByteBuffer(), outputStream)))
.verifyComplete();
- ByteBuffer result = ByteBuffer.wrap(SMALL_CONTENT.toBytes());
- outputChannel.read(result, 0).get();
-
- // make Java 8 happy
- Buffer flip = result.flip();
- assertArrayEquals(SMALL_CONTENT.toBytes(), (byte[]) flip.array());
+ outputStream.flush();
+ assertArrayEquals(SMALL_CONTENT.toBytes(), Files.readAllBytes(output.toPath()));
}
}
- public static HttpClient createDownloadBlobClient(BinaryData content, String digest) {
+ public static HttpClient createDownloadContentClient(BinaryData content, String digest) {
try (InputStream contentStream = content.toStream()) {
AtomicLong expectedStartPosition = new AtomicLong(0);
long contentLength = content.getLength();
@@ -417,11 +402,7 @@ public static HttpClient createDownloadBlobClient(BinaryData content, String dig
public static HttpClient createClientManifests(BinaryData content, String digest,
ManifestMediaType returnContentType) {
return new MockHttpClient(request -> {
- if (returnContentType == null) {
- assertEquals(DEFAULT_MANIFEST_CONTENT_TYPE, request.getHeaders().getValue(HttpHeaderName.ACCEPT));
- } else {
- assertEquals(returnContentType.toString(), request.getHeaders().getValue(HttpHeaderName.ACCEPT));
- }
+ assertEquals(DEFAULT_MANIFEST_CONTENT_TYPE, request.getHeaders().getValue(HttpHeaderName.ACCEPT));
HttpHeaders headers = new HttpHeaders()
.add(UtilsImpl.DOCKER_DIGEST_HEADER_NAME, digest)
.add(HttpHeaderName.CONTENT_TYPE, returnContentType == null ? ManifestMediaType.OCI_MANIFEST.toString() : returnContentType.toString());
@@ -429,7 +410,7 @@ public static HttpClient createClientManifests(BinaryData content, String digest
});
}
- public static HttpClient createUploadBlobClient(Supplier calculateDigest) {
+ public static HttpClient createUploadContentClient(Supplier calculateDigest) {
AtomicInteger chunkNumber = new AtomicInteger();
return new MockHttpClient(request -> {
String expectedReceivedLocation = String.valueOf(chunkNumber.getAndIncrement());
@@ -479,18 +460,18 @@ private Flux getDataAsync(long size, int chunkSize, MessageDigest sh
});
}
- private ContainerRegistryBlobClient createSyncClient(HttpClient httpClient) {
- return new ContainerRegistryBlobClientBuilder()
+ private ContainerRegistryContentClient createSyncClient(HttpClient httpClient) {
+ return new ContainerRegistryContentClientBuilder()
.endpoint("https://endpoint.com")
- .repository("foo")
+ .repositoryName("foo")
.httpClient(httpClient)
.buildClient();
}
- private ContainerRegistryBlobAsyncClient createAsyncClient(HttpClient httpClient) {
- return new ContainerRegistryBlobClientBuilder()
+ private ContainerRegistryContentAsyncClient createAsyncClient(HttpClient httpClient) {
+ return new ContainerRegistryContentClientBuilder()
.endpoint("https://endpoint.com")
- .repository("foo")
+ .repositoryName("foo")
.httpClient(httpClient)
.buildAsyncClient();
}
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/java/com/azure/containers/containerregistry/TestUtils.java b/sdk/containerregistry/azure-containers-containerregistry/src/test/java/com/azure/containers/containerregistry/TestUtils.java
index afca2ff4bfca4..6deaed00709de 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/test/java/com/azure/containers/containerregistry/TestUtils.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/test/java/com/azure/containers/containerregistry/TestUtils.java
@@ -216,7 +216,8 @@ static void importImage(TestMode mode, String registryName, String repository, L
private static OciImageManifest createManifest() {
OciImageManifest manifest = new OciImageManifest()
- .setConfig(new OciDescriptor()
+ .setSchemaVersion(2)
+ .setConfiguration(new OciDescriptor()
.setMediaType("application/vnd.acme.rocket.config.v1+json")
.setDigest(CONFIG_DIGEST)
.setSizeInBytes(171L));
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.canDownloadManifestWithListOfTypes[1].json b/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.canDownloadManifestWithListOfTypes[1].json
deleted file mode 100644
index d468991edf652..0000000000000
--- a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.canDownloadManifestWithListOfTypes[1].json
+++ /dev/null
@@ -1,453 +0,0 @@
-{
- "networkCallRecords" : [ {
- "Method" : "POST",
- "Uri" : "https://REDACTED.azurecr.io/oauth2/exchange?api-version=2021-07-01",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "bce26712-f266-435b-b0c0-c1f6fec28adf",
- "Content-Type" : "application/x-www-form-urlencoded"
- },
- "Response" : {
- "Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "de8df4a7-d788-45c6-9d08-e3d3d6134056",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
- "Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "332.683333",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "200",
- "Body" : "{\"refresh_token\":\"REDACTED\"}",
- "Date" : "Sat, 11 Mar 2023 00:31:21 GMT",
- "Content-Type" : "application/json; charset=utf-8"
- },
- "Exception" : null
- }, {
- "Method" : "POST",
- "Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "17e307ca-29fa-445a-af57-de16f27be364",
- "Content-Type" : "application/x-www-form-urlencoded"
- },
- "Response" : {
- "Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "c460f878-b54a-4086-8a1b-cc00a7a20b30",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
- "Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "332.4",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "200",
- "Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Sat, 11 Mar 2023 00:31:21 GMT",
- "Content-Type" : "application/json; charset=utf-8"
- },
- "Exception" : null
- }, {
- "Method" : "POST",
- "Uri" : "https://REDACTED.azurecr.io/v2/oci-artifact/blobs/uploads/",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "321da019-82c7-40f8-895e-46d4d5cd9c7c"
- },
- "Response" : {
- "Server" : "openresty",
- "X-Content-Type-Options" : "nosniff",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "Range" : "0-0",
- "StatusCode" : "202",
- "Date" : "Sat, 11 Mar 2023 00:31:21 GMT",
- "Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "27044e39-89a9-4802-a386-1d515374a16d",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
- "Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "c811ebe8-9673-41d1-9947-daa7ae22d655",
- "X-Ms-Client-Request-Id" : "321da019-82c7-40f8-895e-46d4d5cd9c7c",
- "Docker-Upload-Uuid" : "13ac981d-51fe-4fd0-ac7a-264cc1bf30df",
- "Content-Length" : "0",
- "Location" : "/v2/oci-artifact/blobs/uploads/13ac981d-51fe-4fd0-ac7a-264cc1bf30df?_nouploadcache=false&_state=SEavvk9AqF5jSgAQOBPRFJx5HS6bj8laLojrLMf62eF7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiMTNhYzk4MWQtNTFmZS00ZmQwLWFjN2EtMjY0Y2MxYmYzMGRmIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIzLTAzLTExVDAwOjMxOjIxLjI4NDUwMjU0WiJ9"
- },
- "Exception" : null
- }, {
- "Method" : "POST",
- "Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "e50d2704-39a2-45e6-a57b-99eb6ba12ba1",
- "Content-Type" : "application/x-www-form-urlencoded"
- },
- "Response" : {
- "Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "79771062-6940-43e7-bd3e-276427a0269d",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
- "Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "332.666667",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "200",
- "Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Sat, 11 Mar 2023 00:31:21 GMT",
- "Content-Type" : "application/json; charset=utf-8"
- },
- "Exception" : null
- }, {
- "Method" : "PUT",
- "Uri" : "https://REDACTED.azurecr.io/v2/oci-artifact/blobs/uploads/13ac981d-51fe-4fd0-ac7a-264cc1bf30df?_nouploadcache=false&_state=SEavvk9AqF5jSgAQOBPRFJx5HS6bj8laLojrLMf62eF7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiMTNhYzk4MWQtNTFmZS00ZmQwLWFjN2EtMjY0Y2MxYmYzMGRmIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIzLTAzLTExVDAwOjMxOjIxLjI4NDUwMjU0WiJ9&digest=sha256%3A44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "295f3bbc-78f0-4acf-8c9b-d522bc0c770e",
- "Content-Type" : "application/octet-stream"
- },
- "Response" : {
- "Server" : "openresty",
- "X-Content-Type-Options" : "nosniff",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "201",
- "Date" : "Sat, 11 Mar 2023 00:31:21 GMT",
- "Docker-Content-Digest" : "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
- "Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "053a3089-644e-4e13-bb6b-a54e3c6613f7",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
- "Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "60f429e0-a8da-43a5-8ddc-f4e10ba68d2b",
- "X-Ms-Client-Request-Id" : "295f3bbc-78f0-4acf-8c9b-d522bc0c770e",
- "Content-Length" : "0",
- "Location" : "/v2/oci-artifact/blobs/sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a"
- },
- "Exception" : null
- }, {
- "Method" : "POST",
- "Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "b14ea42c-d6db-4c0f-a62b-4dba0d9a0b0c",
- "Content-Type" : "application/x-www-form-urlencoded"
- },
- "Response" : {
- "Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "138f8018-a106-485b-885a-347d09f00f92",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
- "Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "332.383333",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "200",
- "Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Sat, 11 Mar 2023 00:31:21 GMT",
- "Content-Type" : "application/json; charset=utf-8"
- },
- "Exception" : null
- }, {
- "Method" : "POST",
- "Uri" : "https://REDACTED.azurecr.io/v2/oci-artifact/blobs/uploads/",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "2b13b382-48fc-41c0-ad75-62d275731f95"
- },
- "Response" : {
- "Server" : "openresty",
- "X-Content-Type-Options" : "nosniff",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "Range" : "0-0",
- "StatusCode" : "202",
- "Date" : "Sat, 11 Mar 2023 00:31:21 GMT",
- "Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "e79f1349-29a2-46a1-819f-f2c58b03c3fd",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
- "Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "de39f2eb-b4bb-4264-8a49-edbd9c7885a0",
- "X-Ms-Client-Request-Id" : "2b13b382-48fc-41c0-ad75-62d275731f95",
- "Docker-Upload-Uuid" : "9df3e81e-578f-428e-b551-01343849f303",
- "Content-Length" : "0",
- "Location" : "/v2/oci-artifact/blobs/uploads/9df3e81e-578f-428e-b551-01343849f303?_nouploadcache=false&_state=FwuATEyWzOuXr1uvk-Cxp-Dq7uqz8ApAStpW-zOvWk97Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiOWRmM2U4MWUtNTc4Zi00MjhlLWI1NTEtMDEzNDM4NDlmMzAzIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIzLTAzLTExVDAwOjMxOjIxLjYxMjY4MDgyMVoifQ%3D%3D"
- },
- "Exception" : null
- }, {
- "Method" : "POST",
- "Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "1992ad1d-4938-4838-91d7-9be160606705",
- "Content-Type" : "application/x-www-form-urlencoded"
- },
- "Response" : {
- "Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "77019631-aa9b-4573-9e33-e7bd20d7ad36",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
- "Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "332.65",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "200",
- "Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Sat, 11 Mar 2023 00:31:21 GMT",
- "Content-Type" : "application/json; charset=utf-8"
- },
- "Exception" : null
- }, {
- "Method" : "PUT",
- "Uri" : "https://REDACTED.azurecr.io/v2/oci-artifact/blobs/uploads/9df3e81e-578f-428e-b551-01343849f303?_nouploadcache=false&_state=FwuATEyWzOuXr1uvk-Cxp-Dq7uqz8ApAStpW-zOvWk97Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiOWRmM2U4MWUtNTc4Zi00MjhlLWI1NTEtMDEzNDM4NDlmMzAzIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIzLTAzLTExVDAwOjMxOjIxLjYxMjY4MDgyMVoifQ%3D%3D&digest=sha256%3Ab94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "2db1f2de-8784-4129-bdc5-55328ec0ae9e",
- "Content-Type" : "application/octet-stream"
- },
- "Response" : {
- "Server" : "openresty",
- "X-Content-Type-Options" : "nosniff",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "201",
- "Date" : "Sat, 11 Mar 2023 00:31:21 GMT",
- "Docker-Content-Digest" : "sha256:b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9",
- "Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "669e20fd-448a-4723-8850-89aff0b3e48d",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
- "Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "3ecb956a-b768-4cdd-8eac-e0abf7baaf40",
- "X-Ms-Client-Request-Id" : "2db1f2de-8784-4129-bdc5-55328ec0ae9e",
- "Content-Length" : "0",
- "Location" : "/v2/oci-artifact/blobs/sha256:b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9"
- },
- "Exception" : null
- }, {
- "Method" : "POST",
- "Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "1a024a00-a999-4814-94ee-6e139331444c",
- "Content-Type" : "application/x-www-form-urlencoded"
- },
- "Response" : {
- "Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "2e9d1c8d-bedd-42f7-864e-e5ae86806325",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
- "Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "332.366667",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "200",
- "Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Sat, 11 Mar 2023 00:31:21 GMT",
- "Content-Type" : "application/json; charset=utf-8"
- },
- "Exception" : null
- }, {
- "Method" : "PUT",
- "Uri" : "https://REDACTED.azurecr.io/v2/oci-artifact/manifests/sha256:492bc88863bdf51159c4efe84e851c48d7034881159b56c4338003e50e801598",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "018a7d70-2deb-4000-b3b6-7e0e217a8496",
- "Content-Type" : "application/vnd.oci.image.manifest.v1+json"
- },
- "Response" : {
- "Server" : "openresty",
- "X-Content-Type-Options" : "nosniff",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "201",
- "Date" : "Sat, 11 Mar 2023 00:31:22 GMT",
- "Docker-Content-Digest" : "sha256:492bc88863bdf51159c4efe84e851c48d7034881159b56c4338003e50e801598",
- "Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "d86706f7-1bed-4980-8699-48726e8e5fbb",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
- "Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "1f4f44b5-d7eb-481a-a331-eb57eee8293c",
- "X-Ms-Client-Request-Id" : "018a7d70-2deb-4000-b3b6-7e0e217a8496",
- "Content-Length" : "0",
- "Location" : "/v2/oci-artifact/manifests/sha256:492bc88863bdf51159c4efe84e851c48d7034881159b56c4338003e50e801598"
- },
- "Exception" : null
- }, {
- "Method" : "POST",
- "Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "4bd313da-4ec6-4656-9c05-a6e2039d7352",
- "Content-Type" : "application/x-www-form-urlencoded"
- },
- "Response" : {
- "Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "6bd9199d-239b-48ba-9910-dbf929e50b7f",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
- "Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "332.633333",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "200",
- "Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Sat, 11 Mar 2023 00:31:22 GMT",
- "Content-Type" : "application/json; charset=utf-8"
- },
- "Exception" : null
- }, {
- "Method" : "GET",
- "Uri" : "https://REDACTED.azurecr.io/v2/oci-artifact/manifests/sha256:492bc88863bdf51159c4efe84e851c48d7034881159b56c4338003e50e801598",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "8f17c049-ddcc-4113-bb68-d39e80f2bdfb"
- },
- "Response" : {
- "Server" : "openresty",
- "X-Content-Type-Options" : "nosniff",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "200",
- "Date" : "Sat, 11 Mar 2023 00:31:22 GMT",
- "Docker-Content-Digest" : "sha256:492bc88863bdf51159c4efe84e851c48d7034881159b56c4338003e50e801598",
- "Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "dc5b9095-729a-4c91-b7ea-1329a1e65659",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
- "Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "1fab99c2-9365-4d80-a318-3842fe1a255e",
- "X-Ms-Client-Request-Id" : "8f17c049-ddcc-4113-bb68-d39e80f2bdfb",
- "Etag" : "\"sha256:492bc88863bdf51159c4efe84e851c48d7034881159b56c4338003e50e801598\"",
- "Content-Length" : "459",
- "Body" : "{\"schemaVersion\":2,\"config\":{\"mediaType\":\"application/vnd.acme.rocket.config.v1+json\",\"size\":171,\"digest\":\"sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a\"},\"layers\":[{\"mediaType\":\"application/vnd.oci.image.layer.v1.tar\",\"size\":28,\"digest\":\"sha256:b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9\",\"annotations\":{\"org.opencontainers.image.ref.name\":\"654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed\"}}]}",
- "Content-Type" : "application/vnd.oci.image.manifest.v1+json"
- },
- "Exception" : null
- }, {
- "Method" : "POST",
- "Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "beb4686e-4692-496d-9f67-3f0d4b60f4b5",
- "Content-Type" : "application/x-www-form-urlencoded"
- },
- "Response" : {
- "Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "ca315cac-3968-4d16-a15e-8700f95d4ad2",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
- "Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "332.616667",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "200",
- "Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Sat, 11 Mar 2023 00:31:22 GMT",
- "Content-Type" : "application/json; charset=utf-8"
- },
- "Exception" : null
- }, {
- "Method" : "DELETE",
- "Uri" : "https://REDACTED.azurecr.io/v2/oci-artifact/blobs/sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "d07bfd04-42c8-4d02-adcb-e6f8cf462b52"
- },
- "Response" : {
- "Server" : "openresty",
- "X-Content-Type-Options" : "nosniff",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "202",
- "Date" : "Sat, 11 Mar 2023 00:31:22 GMT",
- "Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "2c271437-2a65-4d38-ad6e-b6f617dcf125",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
- "Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "966d44fa-b448-40ed-86a0-17edf04d4559",
- "X-Ms-Client-Request-Id" : "d07bfd04-42c8-4d02-adcb-e6f8cf462b52",
- "X-Ms-Ratelimit-Remaining-Calls-Per-Second" : "32.000000",
- "Content-Length" : "0"
- },
- "Exception" : null
- }, {
- "Method" : "POST",
- "Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "ddb5acdc-0fd6-4ee3-b5f4-70ec86fdc397",
- "Content-Type" : "application/x-www-form-urlencoded"
- },
- "Response" : {
- "Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "59a14abe-591c-4360-b8de-b157a6806616",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
- "Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "331.983333",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "200",
- "Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Sat, 11 Mar 2023 00:31:22 GMT",
- "Content-Type" : "application/json; charset=utf-8"
- },
- "Exception" : null
- }, {
- "Method" : "DELETE",
- "Uri" : "https://REDACTED.azurecr.io/v2/oci-artifact/blobs/sha256:b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "6d55295a-94b1-4298-9c58-89b3a643955a"
- },
- "Response" : {
- "Server" : "openresty",
- "X-Content-Type-Options" : "nosniff",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "202",
- "Date" : "Sat, 11 Mar 2023 00:31:22 GMT",
- "Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "a7f04e4d-a7e9-4b50-8ec9-997c6ce29791",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
- "Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "f7e5effa-7158-4143-ac0e-b7cbf5ce80e3",
- "X-Ms-Client-Request-Id" : "6d55295a-94b1-4298-9c58-89b3a643955a",
- "X-Ms-Ratelimit-Remaining-Calls-Per-Second" : "31.000000",
- "Content-Length" : "0"
- },
- "Exception" : null
- }, {
- "Method" : "POST",
- "Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "ae7bc863-3fa4-4996-80f7-96692904d0ed",
- "Content-Type" : "application/x-www-form-urlencoded"
- },
- "Response" : {
- "Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "05437644-a5d2-4f72-8ea2-78b9356f5d04",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
- "Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "331.966667",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "200",
- "Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Sat, 11 Mar 2023 00:31:22 GMT",
- "Content-Type" : "application/json; charset=utf-8"
- },
- "Exception" : null
- }, {
- "Method" : "DELETE",
- "Uri" : "https://REDACTED.azurecr.io/v2/oci-artifact/manifests/sha256:492bc88863bdf51159c4efe84e851c48d7034881159b56c4338003e50e801598",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "60629951-ed91-4478-ba27-60d8dae6b14f"
- },
- "Response" : {
- "Server" : "openresty",
- "X-Content-Type-Options" : "nosniff",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "202",
- "Date" : "Sat, 11 Mar 2023 00:31:22 GMT",
- "Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "2d1fba96-45c6-4f5d-925c-303829958dcf",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
- "Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "ac2bc7cd-d1b5-4266-9b2d-db3e790d709d",
- "X-Ms-Client-Request-Id" : "60629951-ed91-4478-ba27-60d8dae6b14f",
- "X-Ms-Ratelimit-Remaining-Calls-Per-Second" : "30.000000",
- "Content-Length" : "0"
- },
- "Exception" : null
- } ],
- "variables" : [ ]
-}
\ No newline at end of file
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.downloadManifestWithListOfTypesAsync[1].json b/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.downloadManifestWithListOfTypesAsync[1].json
deleted file mode 100644
index bc84cf7211124..0000000000000
--- a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.downloadManifestWithListOfTypesAsync[1].json
+++ /dev/null
@@ -1,549 +0,0 @@
-{
- "networkCallRecords" : [ {
- "Method" : "POST",
- "Uri" : "https://REDACTED.azurecr.io/oauth2/exchange?api-version=2021-07-01",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "a0a90370-016a-426d-b661-f5bb584b8a27",
- "Content-Type" : "application/x-www-form-urlencoded"
- },
- "Response" : {
- "Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "e9bc7d1e-595b-402d-8697-8fb6358f9a1a",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
- "Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "332.85",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "200",
- "Body" : "{\"refresh_token\":\"REDACTED\"}",
- "Date" : "Sat, 11 Mar 2023 00:31:02 GMT",
- "Content-Type" : "application/json; charset=utf-8"
- },
- "Exception" : null
- }, {
- "Method" : "POST",
- "Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "8eee0589-19c8-4609-afdc-1821569b5dd7",
- "Content-Type" : "application/x-www-form-urlencoded"
- },
- "Response" : {
- "Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "697a9e35-7a58-4009-9253-b5b3cf3b19a2",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
- "Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "333.066667",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "200",
- "Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Sat, 11 Mar 2023 00:31:02 GMT",
- "Content-Type" : "application/json; charset=utf-8"
- },
- "Exception" : null
- }, {
- "Method" : "POST",
- "Uri" : "https://REDACTED.azurecr.io/v2/oci-artifact/blobs/uploads/",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "f9969265-2c11-49e5-8c71-7d01b8928c58"
- },
- "Response" : {
- "Server" : "openresty",
- "X-Content-Type-Options" : "nosniff",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "Range" : "0-0",
- "StatusCode" : "202",
- "Date" : "Sat, 11 Mar 2023 00:31:02 GMT",
- "Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "40dbba0b-6c0b-4d5e-851e-a0171598a9ff",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
- "Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "c839544d-1ea1-4889-b7e5-f582b1e81cf8",
- "X-Ms-Client-Request-Id" : "f9969265-2c11-49e5-8c71-7d01b8928c58",
- "Docker-Upload-Uuid" : "5ac0e651-090f-446f-a8dc-c03c91ab371e",
- "Content-Length" : "0",
- "Location" : "/v2/oci-artifact/blobs/uploads/5ac0e651-090f-446f-a8dc-c03c91ab371e?_nouploadcache=false&_state=kVd9tn-G20hYbaloVwHBrd31giJ3OGVNLg5C1ZCXXFp7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiNWFjMGU2NTEtMDkwZi00NDZmLWE4ZGMtYzAzYzkxYWIzNzFlIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIzLTAzLTExVDAwOjMxOjAyLjUxNjkxNDU4NFoifQ%3D%3D"
- },
- "Exception" : null
- }, {
- "Method" : "POST",
- "Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "8323d473-7e6e-4d35-8443-78be466861b8",
- "Content-Type" : "application/x-www-form-urlencoded"
- },
- "Response" : {
- "Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "da25cd60-a659-46f9-965c-8929a637445c",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
- "Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "332.833333",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "200",
- "Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Sat, 11 Mar 2023 00:31:02 GMT",
- "Content-Type" : "application/json; charset=utf-8"
- },
- "Exception" : null
- }, {
- "Method" : "PATCH",
- "Uri" : "https://REDACTED.azurecr.io/v2/oci-artifact/blobs/uploads/5ac0e651-090f-446f-a8dc-c03c91ab371e?_nouploadcache=false&_state=kVd9tn-G20hYbaloVwHBrd31giJ3OGVNLg5C1ZCXXFp7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiNWFjMGU2NTEtMDkwZi00NDZmLWE4ZGMtYzAzYzkxYWIzNzFlIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIzLTAzLTExVDAwOjMxOjAyLjUxNjkxNDU4NFoifQ%3D%3D",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "b064bf65-cda0-4475-8778-8c55bf175715",
- "Content-Type" : "application/octet-stream"
- },
- "Response" : {
- "Server" : "openresty",
- "X-Content-Type-Options" : "nosniff",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "Range" : "0-1",
- "StatusCode" : "202",
- "Date" : "Sat, 11 Mar 2023 00:31:02 GMT",
- "Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "a6225cd0-4505-4b23-9896-43a6ba9a661a",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
- "Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "3067703d-eacf-4da5-ba87-25704bef3f03",
- "X-Ms-Client-Request-Id" : "b064bf65-cda0-4475-8778-8c55bf175715",
- "Docker-Upload-Uuid" : "5ac0e651-090f-446f-a8dc-c03c91ab371e",
- "Content-Length" : "0",
- "Location" : "/v2/oci-artifact/blobs/uploads/5ac0e651-090f-446f-a8dc-c03c91ab371e?_nouploadcache=false&_state=N8ZmhfKCBBa1jbMpmBY-FTxnxgm0E7RCIwDile1W0nZ7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiNWFjMGU2NTEtMDkwZi00NDZmLWE4ZGMtYzAzYzkxYWIzNzFlIiwiT2Zmc2V0IjoyLCJTdGFydGVkQXQiOiIyMDIzLTAzLTExVDAwOjMxOjAyWiJ9"
- },
- "Exception" : null
- }, {
- "Method" : "POST",
- "Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "d5105e1d-f637-4dd1-98e8-f37d0e99697a",
- "Content-Type" : "application/x-www-form-urlencoded"
- },
- "Response" : {
- "Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "e3cb73d8-ea7b-4ef3-9d26-17f6b0f9866a",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
- "Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "333.05",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "200",
- "Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Sat, 11 Mar 2023 00:31:02 GMT",
- "Content-Type" : "application/json; charset=utf-8"
- },
- "Exception" : null
- }, {
- "Method" : "PUT",
- "Uri" : "https://REDACTED.azurecr.io/v2/oci-artifact/blobs/uploads/5ac0e651-090f-446f-a8dc-c03c91ab371e?_nouploadcache=false&_state=N8ZmhfKCBBa1jbMpmBY-FTxnxgm0E7RCIwDile1W0nZ7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiNWFjMGU2NTEtMDkwZi00NDZmLWE4ZGMtYzAzYzkxYWIzNzFlIiwiT2Zmc2V0IjoyLCJTdGFydGVkQXQiOiIyMDIzLTAzLTExVDAwOjMxOjAyWiJ9&digest=sha256%3A44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "5ffa387f-fbab-49ed-ae45-828acfbdecb8"
- },
- "Response" : {
- "Server" : "openresty",
- "X-Content-Type-Options" : "nosniff",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "201",
- "Date" : "Sat, 11 Mar 2023 00:31:02 GMT",
- "Docker-Content-Digest" : "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
- "Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "8ab4ba5b-a76b-46a9-91a7-ddf1c57ab649",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
- "Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "f739542c-cbec-495d-9bc0-ca6751cd48a4",
- "X-Ms-Client-Request-Id" : "5ffa387f-fbab-49ed-ae45-828acfbdecb8",
- "Content-Length" : "0",
- "Location" : "/v2/oci-artifact/blobs/sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a"
- },
- "Exception" : null
- }, {
- "Method" : "POST",
- "Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "b91358aa-6972-4dfd-880d-85eb46ad5850",
- "Content-Type" : "application/x-www-form-urlencoded"
- },
- "Response" : {
- "Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "2e439d30-e186-4542-a890-4e8695cd4323",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
- "Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "332.816667",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "200",
- "Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Sat, 11 Mar 2023 00:31:02 GMT",
- "Content-Type" : "application/json; charset=utf-8"
- },
- "Exception" : null
- }, {
- "Method" : "POST",
- "Uri" : "https://REDACTED.azurecr.io/v2/oci-artifact/blobs/uploads/",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "d7b2722a-1a72-4a78-b020-6e4ac6060b2c"
- },
- "Response" : {
- "Server" : "openresty",
- "X-Content-Type-Options" : "nosniff",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "Range" : "0-0",
- "StatusCode" : "202",
- "Date" : "Sat, 11 Mar 2023 00:31:03 GMT",
- "Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "09462bba-bc71-4eb1-993d-1dfe4551536a",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
- "Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "3f3700da-387d-45e6-a943-0384a63290d7",
- "X-Ms-Client-Request-Id" : "d7b2722a-1a72-4a78-b020-6e4ac6060b2c",
- "Docker-Upload-Uuid" : "cd694244-7d07-48af-b11f-2bdba7cb8789",
- "Content-Length" : "0",
- "Location" : "/v2/oci-artifact/blobs/uploads/cd694244-7d07-48af-b11f-2bdba7cb8789?_nouploadcache=false&_state=-E9V28TNpXONNCWIUXtjuyhmgakZcLeUmVtFWpeb1Kh7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiY2Q2OTQyNDQtN2QwNy00OGFmLWIxMWYtMmJkYmE3Y2I4Nzg5IiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIzLTAzLTExVDAwOjMxOjAyLjk4NjUyODUxNVoifQ%3D%3D"
- },
- "Exception" : null
- }, {
- "Method" : "POST",
- "Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "94adb947-8c8d-49a5-aa36-1c98b4f8bbce",
- "Content-Type" : "application/x-www-form-urlencoded"
- },
- "Response" : {
- "Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "9faefc4c-5370-4ebe-9fcc-c5977f10a793",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
- "Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "333.033333",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "200",
- "Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Sat, 11 Mar 2023 00:31:03 GMT",
- "Content-Type" : "application/json; charset=utf-8"
- },
- "Exception" : null
- }, {
- "Method" : "PATCH",
- "Uri" : "https://REDACTED.azurecr.io/v2/oci-artifact/blobs/uploads/cd694244-7d07-48af-b11f-2bdba7cb8789?_nouploadcache=false&_state=-E9V28TNpXONNCWIUXtjuyhmgakZcLeUmVtFWpeb1Kh7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiY2Q2OTQyNDQtN2QwNy00OGFmLWIxMWYtMmJkYmE3Y2I4Nzg5IiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIzLTAzLTExVDAwOjMxOjAyLjk4NjUyODUxNVoifQ%3D%3D",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "955ddc9c-44a6-4a8a-9540-3f3d7bd28ae6",
- "Content-Type" : "application/octet-stream"
- },
- "Response" : {
- "Server" : "openresty",
- "X-Content-Type-Options" : "nosniff",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "Range" : "0-10",
- "StatusCode" : "202",
- "Date" : "Sat, 11 Mar 2023 00:31:03 GMT",
- "Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "5f8555fd-bb46-40f6-919e-dfb8af0a2c38",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
- "Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "8535611e-b1ec-4b66-8955-c5c402c48770",
- "X-Ms-Client-Request-Id" : "955ddc9c-44a6-4a8a-9540-3f3d7bd28ae6",
- "Docker-Upload-Uuid" : "cd694244-7d07-48af-b11f-2bdba7cb8789",
- "Content-Length" : "0",
- "Location" : "/v2/oci-artifact/blobs/uploads/cd694244-7d07-48af-b11f-2bdba7cb8789?_nouploadcache=false&_state=zWRbAZIzbVWRdRwk-6GnRxOz6nSeMn9jdxT10NXHGBJ7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiY2Q2OTQyNDQtN2QwNy00OGFmLWIxMWYtMmJkYmE3Y2I4Nzg5IiwiT2Zmc2V0IjoxMSwiU3RhcnRlZEF0IjoiMjAyMy0wMy0xMVQwMDozMTowMloifQ%3D%3D"
- },
- "Exception" : null
- }, {
- "Method" : "POST",
- "Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "62d104a9-7886-4bb6-a03e-9a19337b8a7a",
- "Content-Type" : "application/x-www-form-urlencoded"
- },
- "Response" : {
- "Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "5ca1a014-f8c7-4065-b064-a86d14df12c0",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
- "Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "332.8",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "200",
- "Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Sat, 11 Mar 2023 00:31:03 GMT",
- "Content-Type" : "application/json; charset=utf-8"
- },
- "Exception" : null
- }, {
- "Method" : "PUT",
- "Uri" : "https://REDACTED.azurecr.io/v2/oci-artifact/blobs/uploads/cd694244-7d07-48af-b11f-2bdba7cb8789?_nouploadcache=false&_state=zWRbAZIzbVWRdRwk-6GnRxOz6nSeMn9jdxT10NXHGBJ7Ik5hbWUiOiJvY2ktYXJ0aWZhY3QiLCJVVUlEIjoiY2Q2OTQyNDQtN2QwNy00OGFmLWIxMWYtMmJkYmE3Y2I4Nzg5IiwiT2Zmc2V0IjoxMSwiU3RhcnRlZEF0IjoiMjAyMy0wMy0xMVQwMDozMTowMloifQ%3D%3D&digest=sha256%3Ab94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "7c6e4edb-3ea5-48ac-a525-035b8cfbe0e8"
- },
- "Response" : {
- "Server" : "openresty",
- "X-Content-Type-Options" : "nosniff",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "201",
- "Date" : "Sat, 11 Mar 2023 00:31:03 GMT",
- "Docker-Content-Digest" : "sha256:b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9",
- "Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "d204e54b-ec42-4b60-ad98-a300c8b621c5",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
- "Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "6156b329-d8a3-4a14-a7e6-a08fba09db67",
- "X-Ms-Client-Request-Id" : "7c6e4edb-3ea5-48ac-a525-035b8cfbe0e8",
- "Content-Length" : "0",
- "Location" : "/v2/oci-artifact/blobs/sha256:b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9"
- },
- "Exception" : null
- }, {
- "Method" : "POST",
- "Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "739809cb-b65b-4ac5-9eba-97c32f8bf153",
- "Content-Type" : "application/x-www-form-urlencoded"
- },
- "Response" : {
- "Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "cda2a7ed-4276-44a9-b617-96f665c715df",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
- "Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "333.016667",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "200",
- "Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Sat, 11 Mar 2023 00:31:03 GMT",
- "Content-Type" : "application/json; charset=utf-8"
- },
- "Exception" : null
- }, {
- "Method" : "PUT",
- "Uri" : "https://REDACTED.azurecr.io/v2/oci-artifact/manifests/sha256:492bc88863bdf51159c4efe84e851c48d7034881159b56c4338003e50e801598",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "ba9be621-47f7-4c9e-a225-55367b4782b8",
- "Content-Type" : "application/vnd.oci.image.manifest.v1+json"
- },
- "Response" : {
- "Server" : "openresty",
- "X-Content-Type-Options" : "nosniff",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "201",
- "Date" : "Sat, 11 Mar 2023 00:31:03 GMT",
- "Docker-Content-Digest" : "sha256:492bc88863bdf51159c4efe84e851c48d7034881159b56c4338003e50e801598",
- "Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "d469a8d8-5562-4651-8c00-5326e0d4bc20",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
- "Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "5f7ff146-974d-41b7-aa51-797b368dd737",
- "X-Ms-Client-Request-Id" : "ba9be621-47f7-4c9e-a225-55367b4782b8",
- "Content-Length" : "0",
- "Location" : "/v2/oci-artifact/manifests/sha256:492bc88863bdf51159c4efe84e851c48d7034881159b56c4338003e50e801598"
- },
- "Exception" : null
- }, {
- "Method" : "POST",
- "Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "71defc9c-55e4-4692-996a-7189ab4f50fe",
- "Content-Type" : "application/x-www-form-urlencoded"
- },
- "Response" : {
- "Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "96c86585-73df-473b-a732-150fff2dd8c4",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
- "Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "332.783333",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "200",
- "Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Sat, 11 Mar 2023 00:31:03 GMT",
- "Content-Type" : "application/json; charset=utf-8"
- },
- "Exception" : null
- }, {
- "Method" : "GET",
- "Uri" : "https://REDACTED.azurecr.io/v2/oci-artifact/manifests/sha256:492bc88863bdf51159c4efe84e851c48d7034881159b56c4338003e50e801598",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "0d7cdce6-2c4d-4e62-9e53-b54d4ed53f4f"
- },
- "Response" : {
- "Server" : "openresty",
- "X-Content-Type-Options" : "nosniff",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "200",
- "Date" : "Sat, 11 Mar 2023 00:31:03 GMT",
- "Docker-Content-Digest" : "sha256:492bc88863bdf51159c4efe84e851c48d7034881159b56c4338003e50e801598",
- "Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "af892a26-d49e-400b-9a29-9aca7c5b230a",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
- "Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "658a018d-2c0d-40fd-803c-e89c79069e01",
- "X-Ms-Client-Request-Id" : "0d7cdce6-2c4d-4e62-9e53-b54d4ed53f4f",
- "Etag" : "\"sha256:492bc88863bdf51159c4efe84e851c48d7034881159b56c4338003e50e801598\"",
- "Content-Length" : "459",
- "Body" : "{\"schemaVersion\":2,\"config\":{\"mediaType\":\"application/vnd.acme.rocket.config.v1+json\",\"size\":171,\"digest\":\"sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a\"},\"layers\":[{\"mediaType\":\"application/vnd.oci.image.layer.v1.tar\",\"size\":28,\"digest\":\"sha256:b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9\",\"annotations\":{\"org.opencontainers.image.ref.name\":\"654b93f61054e4ce90ed203bb8d556a6200d5f906cf3eca0620738d6dc18cbed\"}}]}",
- "Content-Type" : "application/vnd.oci.image.manifest.v1+json"
- },
- "Exception" : null
- }, {
- "Method" : "POST",
- "Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "904500ce-1634-46a4-9507-0aa086761b7b",
- "Content-Type" : "application/x-www-form-urlencoded"
- },
- "Response" : {
- "Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "cd7873a5-70fb-44cd-8d4c-9cebe5442f18",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
- "Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "332.7",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "200",
- "Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Sat, 11 Mar 2023 00:31:03 GMT",
- "Content-Type" : "application/json; charset=utf-8"
- },
- "Exception" : null
- }, {
- "Method" : "DELETE",
- "Uri" : "https://REDACTED.azurecr.io/v2/oci-artifact/blobs/sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "d0c18aca-2459-4e6c-a845-b1de33312438"
- },
- "Response" : {
- "Server" : "openresty",
- "X-Content-Type-Options" : "nosniff",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "202",
- "Date" : "Sat, 11 Mar 2023 00:31:03 GMT",
- "Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "72ca9b7c-ab61-45da-b373-ebc89ddcd079",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
- "Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "5a36295e-0ffb-4c6d-b92f-40e687e164e1",
- "X-Ms-Client-Request-Id" : "d0c18aca-2459-4e6c-a845-b1de33312438",
- "X-Ms-Ratelimit-Remaining-Calls-Per-Second" : "32.000000",
- "Content-Length" : "0"
- },
- "Exception" : null
- }, {
- "Method" : "POST",
- "Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "25e1a06e-9b54-41f7-bc36-7eacd48c0b9d",
- "Content-Type" : "application/x-www-form-urlencoded"
- },
- "Response" : {
- "Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "c49137a5-ff28-4f2c-b865-48239ff25066",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
- "Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "332.9",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "200",
- "Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Sat, 11 Mar 2023 00:31:04 GMT",
- "Content-Type" : "application/json; charset=utf-8"
- },
- "Exception" : null
- }, {
- "Method" : "DELETE",
- "Uri" : "https://REDACTED.azurecr.io/v2/oci-artifact/blobs/sha256:b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "0281cee7-e94e-48d2-9a8d-dc547f39ea26"
- },
- "Response" : {
- "Server" : "openresty",
- "X-Content-Type-Options" : "nosniff",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "202",
- "Date" : "Sat, 11 Mar 2023 00:31:04 GMT",
- "Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "362336c7-e516-4d2e-aee1-164b3273026f",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
- "Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "91d3d886-b52f-44a5-aea2-36fa7253809d",
- "X-Ms-Client-Request-Id" : "0281cee7-e94e-48d2-9a8d-dc547f39ea26",
- "X-Ms-Ratelimit-Remaining-Calls-Per-Second" : "31.000000",
- "Content-Length" : "0"
- },
- "Exception" : null
- }, {
- "Method" : "POST",
- "Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "648f1bd2-a104-45bf-9136-5adc769c7d97",
- "Content-Type" : "application/x-www-form-urlencoded"
- },
- "Response" : {
- "Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "c064ff7c-afe1-4b37-b1ba-a9d37622b107",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
- "Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "332.683333",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "200",
- "Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Sat, 11 Mar 2023 00:31:04 GMT",
- "Content-Type" : "application/json; charset=utf-8"
- },
- "Exception" : null
- }, {
- "Method" : "DELETE",
- "Uri" : "https://REDACTED.azurecr.io/v2/oci-artifact/manifests/sha256:492bc88863bdf51159c4efe84e851c48d7034881159b56c4338003e50e801598",
- "Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "bb60aa36-87d6-49f9-a3f5-9aee8f436e43"
- },
- "Response" : {
- "Server" : "openresty",
- "X-Content-Type-Options" : "nosniff",
- "Connection" : "keep-alive",
- "retry-after" : "0",
- "StatusCode" : "202",
- "Date" : "Sat, 11 Mar 2023 00:31:04 GMT",
- "Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "4130e174-6706-4ac2-8348-d1ca073885cd",
- "Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
- "Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "d3b8d90d-1951-4d0e-9042-b8958e502a08",
- "X-Ms-Client-Request-Id" : "bb60aa36-87d6-49f9-a3f5-9aee8f436e43",
- "X-Ms-Ratelimit-Remaining-Calls-Per-Second" : "30.000000",
- "Content-Length" : "0"
- },
- "Exception" : null
- } ],
- "variables" : [ ]
-}
\ No newline at end of file
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegerationTests.uploadManifest[1].json b/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegerationTests.uploadManifest[1].json
similarity index 100%
rename from sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegerationTests.uploadManifest[1].json
rename to sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegerationTests.uploadManifest[1].json
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.canUploadBlob[1].json b/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.canUploadBlob[1].json
similarity index 100%
rename from sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.canUploadBlob[1].json
rename to sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.canUploadBlob[1].json
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.canUploadDockerManifestWithTagAsync[1].json b/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.canUploadDockerManifestWithTagAsync[1].json
similarity index 100%
rename from sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.canUploadDockerManifestWithTagAsync[1].json
rename to sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.canUploadDockerManifestWithTagAsync[1].json
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.canUploadDockerManifestWithTag[1].json b/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.canUploadDockerManifestWithTag[1].json
similarity index 100%
rename from sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.canUploadDockerManifestWithTag[1].json
rename to sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.canUploadDockerManifestWithTag[1].json
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.canUploadHugeBlobInChunksAsync[1].json b/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.canUploadHugeBlobInChunksAsync[1].json
similarity index 100%
rename from sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.canUploadHugeBlobInChunksAsync[1].json
rename to sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.canUploadHugeBlobInChunksAsync[1].json
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.canUploadHugeBlobInChunks[1].json b/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.canUploadHugeBlobInChunks[1].json
similarity index 100%
rename from sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.canUploadHugeBlobInChunks[1].json
rename to sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.canUploadHugeBlobInChunks[1].json
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.canUploadOciManifestAsync[1].json b/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.canUploadOciManifestAsync[1].json
similarity index 100%
rename from sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.canUploadOciManifestAsync[1].json
rename to sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.canUploadOciManifestAsync[1].json
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.canUploadOciManifestBinaryData[1].json b/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.canUploadOciManifestBinaryData[1].json
similarity index 100%
rename from sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.canUploadOciManifestBinaryData[1].json
rename to sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.canUploadOciManifestBinaryData[1].json
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.canUploadOciManifestViaOptions[1].json b/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.canUploadOciManifestViaOptions[1].json
similarity index 100%
rename from sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.canUploadOciManifestViaOptions[1].json
rename to sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.canUploadOciManifestViaOptions[1].json
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.canUploadOciManifestWithTag[1].json b/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.canUploadOciManifestWithTag[1].json
similarity index 100%
rename from sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.canUploadOciManifestWithTag[1].json
rename to sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.canUploadOciManifestWithTag[1].json
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.canUploadOciManifest[1].json b/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.canUploadOciManifest[1].json
similarity index 100%
rename from sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.canUploadOciManifest[1].json
rename to sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.canUploadOciManifest[1].json
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.downloadBlobAsync[1].json b/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.downloadBlobAsync[1].json
similarity index 100%
rename from sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.downloadBlobAsync[1].json
rename to sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.downloadBlobAsync[1].json
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.downloadBlob[1].json b/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.downloadBlob[1].json
similarity index 100%
rename from sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.downloadBlob[1].json
rename to sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.downloadBlob[1].json
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.downloadSmallBlobAsync[1].json b/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.downloadSmallBlobAsync[1].json
similarity index 100%
rename from sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.downloadSmallBlobAsync[1].json
rename to sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.downloadSmallBlobAsync[1].json
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.downloadSmallBlob[1].json b/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.downloadSmallBlob[1].json
similarity index 100%
rename from sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.downloadSmallBlob[1].json
rename to sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.downloadSmallBlob[1].json
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.downloadManifestAsync[1].json b/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.getManifestAsync[1].json
similarity index 100%
rename from sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.downloadManifestAsync[1].json
rename to sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.getManifestAsync[1].json
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.downloadManifestIncompatibleType[1].json b/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.getManifestDifferentType[1].json
similarity index 52%
rename from sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.downloadManifestIncompatibleType[1].json
rename to sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.getManifestDifferentType[1].json
index 303767d83d2c8..7e19e2fbd8435 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.downloadManifestIncompatibleType[1].json
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.getManifestDifferentType[1].json
@@ -3,21 +3,21 @@
"Method" : "POST",
"Uri" : "https://REDACTED.azurecr.io/oauth2/exchange?api-version=2021-07-01",
"Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.3 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "cf527caf-b438-4aa1-8674-a5df02a75317",
+ "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
+ "x-ms-client-request-id" : "304770e6-ed38-4223-bbf4-732b5fcf069d",
"Content-Type" : "application/x-www-form-urlencoded"
},
"Response" : {
"Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "f6eecb9c-29d4-4bc9-a448-f98620fe7ec3",
+ "X-Ms-Correlation-Request-Id" : "7b0dc6e8-d560-44f8-a6fa-7fe20a99a749",
"Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
"Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "332.5",
+ "x-ms-ratelimit-remaining-calls-per-second" : "332.95",
"Connection" : "keep-alive",
"retry-after" : "0",
"StatusCode" : "200",
"Body" : "{\"refresh_token\":\"REDACTED\"}",
- "Date" : "Fri, 10 Mar 2023 02:48:03 GMT",
+ "Date" : "Thu, 16 Mar 2023 21:47:07 GMT",
"Content-Type" : "application/json; charset=utf-8"
},
"Exception" : null
@@ -25,21 +25,21 @@
"Method" : "POST",
"Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
"Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.3 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "956784e9-12e4-4978-b465-1436499af5bf",
+ "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
+ "x-ms-client-request-id" : "e71d8daf-5f42-4158-b15d-8ce828082ab7",
"Content-Type" : "application/x-www-form-urlencoded"
},
"Response" : {
"Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "3f94690f-071c-4d03-80e9-7c6b2bad04e4",
+ "X-Ms-Correlation-Request-Id" : "33336f75-7e38-4b7a-9825-de9cf5a7984d",
"Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
"Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "332.883333",
+ "x-ms-ratelimit-remaining-calls-per-second" : "333.05",
"Connection" : "keep-alive",
"retry-after" : "0",
"StatusCode" : "200",
"Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Fri, 10 Mar 2023 02:48:03 GMT",
+ "Date" : "Thu, 16 Mar 2023 21:47:07 GMT",
"Content-Type" : "application/json; charset=utf-8"
},
"Exception" : null
@@ -47,8 +47,8 @@
"Method" : "GET",
"Uri" : "https://REDACTED.azurecr.io/v2/library%2Fhello-world/manifests/latest",
"Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.3 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "7f452ace-dc59-4541-a94f-f953f30dc65e"
+ "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
+ "x-ms-client-request-id" : "afe8ba9d-6687-45f0-88fa-43094c54edfc"
},
"Response" : {
"Server" : "openresty",
@@ -56,39 +56,39 @@
"Connection" : "keep-alive",
"retry-after" : "0",
"StatusCode" : "200",
- "Date" : "Fri, 10 Mar 2023 02:48:03 GMT",
- "Docker-Content-Digest" : "sha256:f22b12a8e1e51b533588b4ea81af13d7210dd6663373dbd3b284ca926ffa5da0",
+ "Date" : "Thu, 16 Mar 2023 21:47:07 GMT",
+ "Docker-Content-Digest" : "sha256:ffb13da98453e0f04d33a6eee5bb8e46ee50d08ebe17735fc0779d0349e889e9",
"Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "180a9850-9971-4f23-b5d5-9e4fcb0ceffe",
+ "X-Ms-Correlation-Request-Id" : "e47d469a-5d16-4ce7-be9d-93f966bcfc2a",
"Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
"Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "b9b39dd6-a43a-491f-a117-11d151af4b6c",
- "X-Ms-Client-Request-Id" : "7f452ace-dc59-4541-a94f-f953f30dc65e",
- "Etag" : "\"sha256:f22b12a8e1e51b533588b4ea81af13d7210dd6663373dbd3b284ca926ffa5da0\"",
- "Content-Length" : "2747",
- "Body" : "{\n \"schemaVersion\": 1,\n \"name\": \"library/hello-world\",\n \"tag\": \"latest\",\n \"architecture\": \"amd64\",\n \"fsLayers\": [\n {\n \"blobSum\": \"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4\"\n },\n {\n \"blobSum\": \"sha256:2db29710123e3e53a794f2694094b9b4338aa9ee5c40b930cb8063a1be392c54\"\n }\n ],\n \"history\": [\n {\n \"v1Compatibility\": \"{\\\"architecture\\\":\\\"amd64\\\",\\\"config\\\":{\\\"Hostname\\\":\\\"\\\",\\\"Domainname\\\":\\\"\\\",\\\"User\\\":\\\"\\\",\\\"AttachStdin\\\":false,\\\"AttachStdout\\\":false,\\\"AttachStderr\\\":false,\\\"Tty\\\":false,\\\"OpenStdin\\\":false,\\\"StdinOnce\\\":false,\\\"Env\\\":[\\\"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\\\"],\\\"Cmd\\\":[\\\"/hello\\\"],\\\"Image\\\":\\\"sha256:b9935d4e8431fb1a7f0989304ec86b3329a99a25f5efdc7f09f3f8c41434ca6d\\\",\\\"Volumes\\\":null,\\\"WorkingDir\\\":\\\"\\\",\\\"Entrypoint\\\":null,\\\"OnBuild\\\":null,\\\"Labels\\\":null},\\\"container\\\":\\\"8746661ca3c2f215da94e6d3f7dfdcafaff5ec0b21c9aff6af3dc379a82fbc72\\\",\\\"container_config\\\":{\\\"Hostname\\\":\\\"8746661ca3c2\\\",\\\"Domainname\\\":\\\"\\\",\\\"User\\\":\\\"\\\",\\\"AttachStdin\\\":false,\\\"AttachStdout\\\":false,\\\"AttachStderr\\\":false,\\\"Tty\\\":false,\\\"OpenStdin\\\":false,\\\"StdinOnce\\\":false,\\\"Env\\\":[\\\"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\\\"],\\\"Cmd\\\":[\\\"/bin/sh\\\",\\\"-c\\\",\\\"#(nop) \\\",\\\"CMD [\\\\\\\"/hello\\\\\\\"]\\\"],\\\"Image\\\":\\\"sha256:b9935d4e8431fb1a7f0989304ec86b3329a99a25f5efdc7f09f3f8c41434ca6d\\\",\\\"Volumes\\\":null,\\\"WorkingDir\\\":\\\"\\\",\\\"Entrypoint\\\":null,\\\"OnBuild\\\":null,\\\"Labels\\\":{}},\\\"created\\\":\\\"2021-09-23T23:47:57.442225064Z\\\",\\\"docker_version\\\":\\\"20.10.7\\\",\\\"id\\\":\\\"a1f125167a7f2cffa48b7851ff3f75e983824c16e8da61f20765eb55f7b3a594\\\",\\\"os\\\":\\\"linux\\\",\\\"parent\\\":\\\"cd13bf215b21e9bc78460fa5070860a498671e2ac282d86d15042cf0c26e6e8b\\\",\\\"throwaway\\\":true}\"\n },\n {\n \"v1Compatibility\": \"{\\\"id\\\":\\\"cd13bf215b21e9bc78460fa5070860a498671e2ac282d86d15042cf0c26e6e8b\\\",\\\"created\\\":\\\"2021-09-23T23:47:57.098990892Z\\\",\\\"container_config\\\":{\\\"Cmd\\\":[\\\"/bin/sh -c #(nop) COPY file:50563a97010fd7ce1ceebd1fa4f4891ac3decdf428333fb2683696f4358af6c2 in / \\\"]}}\"\n }\n ],\n \"signatures\": [\n {\n \"header\": {\n \"jwk\": {\n \"crv\": \"P-256\",\n \"kid\": \"XII7:C4CL:NMZ7:FI4T:HI6N:MVOL:ZQUH:6RWO:ABIK:SD4V:FYDS:BWXZ\",\n \"kty\": \"EC\",\n \"x\": \"ZzTrnuAoT8lr3jlH5W_p6RRYaH0STb4nuPG8WcGXQu8\",\n \"y\": \"fZXwo506w0bDSMQM4_4QsZV7lSpaUG74UCoIEDHq8Mk\"\n },\n \"alg\": \"ES256\"\n },\n \"signature\": \"ciCP30zrZ6Awm9s-tsg7gVLOwbvRMB2mOyHvsSBcLWae2d4ca7P124kfHq_xCV8zzeDtQMxzVIHkwP792zFc3g\",\n \"protected\": \"eyJmb3JtYXRMZW5ndGgiOjIxMDAsImZvcm1hdFRhaWwiOiJDbjAiLCJ0aW1lIjoiMjAyMy0wMy0xMFQwMjo0ODowM1oifQ\"\n }\n ]\n}",
- "Content-Type" : "application/vnd.docker.distribution.manifest.v1+prettyjws"
+ "X-Ms-Request-Id" : "44ab8b4d-8da6-48db-8a34-9402cebdb956",
+ "X-Ms-Client-Request-Id" : "afe8ba9d-6687-45f0-88fa-43094c54edfc",
+ "Etag" : "\"sha256:ffb13da98453e0f04d33a6eee5bb8e46ee50d08ebe17735fc0779d0349e889e9\"",
+ "Content-Length" : "2561",
+ "Body" : "{\"manifests\":[{\"digest\":\"sha256:f54a58bc1aac5ea1a25d796ae155dc228b3f0e11d046ae276b39c4bf2f13d8c4\",\"mediaType\":\"application\\/vnd.docker.distribution.manifest.v2+json\",\"platform\":{\"architecture\":\"amd64\",\"os\":\"linux\"},\"size\":525},{\"digest\":\"sha256:6253ef1af25aabd67777a01c686e7c69ee612961db34c8b90da079e5473be83b\",\"mediaType\":\"application\\/vnd.docker.distribution.manifest.v2+json\",\"platform\":{\"architecture\":\"arm\",\"os\":\"linux\",\"variant\":\"v5\"},\"size\":525},{\"digest\":\"sha256:40d0cfd0861719208ff9f7747ab3f97844eeca509df705db44a736df863b76af\",\"mediaType\":\"application\\/vnd.docker.distribution.manifest.v2+json\",\"platform\":{\"architecture\":\"arm\",\"os\":\"linux\",\"variant\":\"v7\"},\"size\":525},{\"digest\":\"sha256:432f982638b3aefab73cc58ab28f5c16e96fdb504e8c134fc58dff4bae8bf338\",\"mediaType\":\"application\\/vnd.docker.distribution.manifest.v2+json\",\"platform\":{\"architecture\":\"arm64\",\"os\":\"linux\",\"variant\":\"v8\"},\"size\":525},{\"digest\":\"sha256:995efde2e81b21d1ea7066aa77a59298a62a9e9fbb4b77f36c189774ec9b1089\",\"mediaType\":\"application\\/vnd.docker.distribution.manifest.v2+json\",\"platform\":{\"architecture\":\"386\",\"os\":\"linux\"},\"size\":525},{\"digest\":\"sha256:eb11b1a194ff8e236a01eff392c4e1296a53b0fb4780d8b0382f7996a15d5392\",\"mediaType\":\"application\\/vnd.docker.distribution.manifest.v2+json\",\"platform\":{\"architecture\":\"mips64le\",\"os\":\"linux\"},\"size\":525},{\"digest\":\"sha256:3209b9aec056b296ea55b2af7757d078bf92e55a3ea29c5fdef5c785bcef09c4\",\"mediaType\":\"application\\/vnd.docker.distribution.manifest.v2+json\",\"platform\":{\"architecture\":\"ppc64le\",\"os\":\"linux\"},\"size\":525},{\"digest\":\"sha256:98c9722322be649df94780d3fbe594fce7996234b259f27eac9428b84050c849\",\"mediaType\":\"application\\/vnd.docker.distribution.manifest.v2+json\",\"platform\":{\"architecture\":\"riscv64\",\"os\":\"linux\"},\"size\":525},{\"digest\":\"sha256:c7b6944911848ce39b44ed660d95fb54d69bbd531de724c7ce6fc9f743c0b861\",\"mediaType\":\"application\\/vnd.docker.distribution.manifest.v2+json\",\"platform\":{\"architecture\":\"s390x\",\"os\":\"linux\"},\"size\":525},{\"digest\":\"sha256:f5094c800af671abfc125480b44bd223bdb54d0d2b065de6f9f8e9cdf25dead8\",\"mediaType\":\"application\\/vnd.docker.distribution.manifest.v2+json\",\"platform\":{\"architecture\":\"amd64\",\"os\":\"windows\",\"os.version\":\"10.0.20348.1607\"},\"size\":946},{\"digest\":\"sha256:222fd58970d97d818081fee49fa57821d0acad88697639692e5cd0bd26f9f174\",\"mediaType\":\"application\\/vnd.docker.distribution.manifest.v2+json\",\"platform\":{\"architecture\":\"amd64\",\"os\":\"windows\",\"os.version\":\"10.0.17763.4131\"},\"size\":946}],\"mediaType\":\"application\\/vnd.docker.distribution.manifest.list.v2+json\",\"schemaVersion\":2}",
+ "Content-Type" : "application/vnd.docker.distribution.manifest.list.v2+json"
},
"Exception" : null
}, {
"Method" : "POST",
"Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
"Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.3 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "6a90219b-f33b-4fdd-8f66-1060eec5528f",
+ "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
+ "x-ms-client-request-id" : "920b1adb-abf7-4451-b6c1-96dbb0b4d3f8",
"Content-Type" : "application/x-www-form-urlencoded"
},
"Response" : {
"Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "b513b96d-45ac-4306-85e7-1e20a8e50aa9",
+ "X-Ms-Correlation-Request-Id" : "575f6bbb-bf82-4d92-9148-0e2d7a3840d8",
"Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
"Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "332.483333",
+ "x-ms-ratelimit-remaining-calls-per-second" : "332.933333",
"Connection" : "keep-alive",
"retry-after" : "0",
"StatusCode" : "200",
"Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Fri, 10 Mar 2023 02:48:03 GMT",
+ "Date" : "Thu, 16 Mar 2023 21:47:07 GMT",
"Content-Type" : "application/json; charset=utf-8"
},
"Exception" : null
@@ -96,8 +96,8 @@
"Method" : "DELETE",
"Uri" : "https://REDACTED.azurecr.io/v2/library%2Fhello-world/blobs/sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
"Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.3 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "55435448-edfc-4417-a47c-47acb788da02"
+ "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
+ "x-ms-client-request-id" : "d656dbc1-43b2-4667-9e18-dc969a5c04d0"
},
"Response" : {
"Server" : "openresty",
@@ -105,14 +105,14 @@
"Connection" : "keep-alive",
"retry-after" : "0",
"StatusCode" : "404",
- "Date" : "Fri, 10 Mar 2023 02:48:03 GMT",
+ "Date" : "Thu, 16 Mar 2023 21:47:07 GMT",
"Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "8ae8e713-2299-4e34-b2cd-2f157798c0e0",
+ "X-Ms-Correlation-Request-Id" : "96aee582-d59a-4e36-b26b-297f4dfc3171",
"Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
"Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "e3c35792-e296-4d96-9737-f60f4bd2fc93",
- "X-Ms-Client-Request-Id" : "55435448-edfc-4417-a47c-47acb788da02",
- "X-Ms-Ratelimit-Remaining-Calls-Per-Second" : "32.000000",
+ "X-Ms-Request-Id" : "4a20ee5a-53da-4f80-84de-823a7c86cb11",
+ "X-Ms-Client-Request-Id" : "d656dbc1-43b2-4667-9e18-dc969a5c04d0",
+ "X-Ms-Ratelimit-Remaining-Calls-Per-Second" : "31.000000",
"Content-Length" : "74",
"Body" : "{\"errors\":[{\"code\":\"BLOB_UNKNOWN\",\"message\":\"blob unknown to registry\"}]}\n",
"Content-Type" : "application/json; charset=utf-8"
@@ -122,21 +122,21 @@
"Method" : "POST",
"Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
"Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.3 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "0dfdaa56-c6a7-46a7-be14-6208a4c94a89",
+ "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
+ "x-ms-client-request-id" : "8f560c21-7589-414a-84fa-572ffc34d812",
"Content-Type" : "application/x-www-form-urlencoded"
},
"Response" : {
"Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "9122084b-a2d1-4d4b-8adb-9d24f0ce8854",
+ "X-Ms-Correlation-Request-Id" : "45d59417-8537-42a8-aefe-bc7d68641d95",
"Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
"Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "332.683333",
+ "x-ms-ratelimit-remaining-calls-per-second" : "333.15",
"Connection" : "keep-alive",
"retry-after" : "0",
"StatusCode" : "200",
"Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Fri, 10 Mar 2023 02:48:03 GMT",
+ "Date" : "Thu, 16 Mar 2023 21:47:07 GMT",
"Content-Type" : "application/json; charset=utf-8"
},
"Exception" : null
@@ -144,8 +144,8 @@
"Method" : "DELETE",
"Uri" : "https://REDACTED.azurecr.io/v2/library%2Fhello-world/blobs/sha256:b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9",
"Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.3 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "ca7e2887-be18-4339-a55a-d3697fb75923"
+ "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
+ "x-ms-client-request-id" : "f5b7ecba-d79a-4422-b379-b0207a2bec67"
},
"Response" : {
"Server" : "openresty",
@@ -153,13 +153,13 @@
"Connection" : "keep-alive",
"retry-after" : "0",
"StatusCode" : "404",
- "Date" : "Fri, 10 Mar 2023 02:48:04 GMT",
+ "Date" : "Thu, 16 Mar 2023 21:47:07 GMT",
"Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "a449906d-8ad5-4c9d-866d-e2d5df9d9727",
+ "X-Ms-Correlation-Request-Id" : "ccaaa875-72ee-4243-8573-6f7450a63f00",
"Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
"Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "a17c63bb-4882-4aa2-a147-3dc86cf902bc",
- "X-Ms-Client-Request-Id" : "ca7e2887-be18-4339-a55a-d3697fb75923",
+ "X-Ms-Request-Id" : "5f4b7038-a19d-4487-8312-88d5021dcd44",
+ "X-Ms-Client-Request-Id" : "f5b7ecba-d79a-4422-b379-b0207a2bec67",
"X-Ms-Ratelimit-Remaining-Calls-Per-Second" : "31.000000",
"Content-Length" : "74",
"Body" : "{\"errors\":[{\"code\":\"BLOB_UNKNOWN\",\"message\":\"blob unknown to registry\"}]}\n",
@@ -170,21 +170,21 @@
"Method" : "POST",
"Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
"Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.3 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "441606b1-1a08-4098-856d-e213782e299e",
+ "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
+ "x-ms-client-request-id" : "2e80c676-54be-45db-b253-fe3119519d69",
"Content-Type" : "application/x-www-form-urlencoded"
},
"Response" : {
"Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "db5ea192-83cf-409a-b931-cff02c297dab",
+ "X-Ms-Correlation-Request-Id" : "484ffd8c-ff4a-4f83-aa66-5b47129ca018",
"Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
"Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "332.55",
+ "x-ms-ratelimit-remaining-calls-per-second" : "333",
"Connection" : "keep-alive",
"retry-after" : "0",
"StatusCode" : "200",
"Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Fri, 10 Mar 2023 02:48:04 GMT",
+ "Date" : "Thu, 16 Mar 2023 21:47:07 GMT",
"Content-Type" : "application/json; charset=utf-8"
},
"Exception" : null
@@ -192,8 +192,8 @@
"Method" : "DELETE",
"Uri" : "https://REDACTED.azurecr.io/v2/library%2Fhello-world/manifests/sha256:492bc88863bdf51159c4efe84e851c48d7034881159b56c4338003e50e801598",
"Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.3 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "3e5ae895-edd3-4079-9324-3dc2d35f020f"
+ "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
+ "x-ms-client-request-id" : "dd588e13-8abb-43aa-a5d2-4071a4ea8f91"
},
"Response" : {
"Server" : "openresty",
@@ -201,13 +201,13 @@
"Connection" : "keep-alive",
"retry-after" : "0",
"StatusCode" : "404",
- "Date" : "Fri, 10 Mar 2023 02:48:04 GMT",
+ "Date" : "Thu, 16 Mar 2023 21:47:07 GMT",
"Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "90d98758-7171-4e2c-b555-52eb9f8b058b",
+ "X-Ms-Correlation-Request-Id" : "4f894798-3756-4352-bb87-e85bbc2c41b5",
"Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
"Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "2e86cbfc-4bbb-46d5-96cb-0f0f6439aad1",
- "X-Ms-Client-Request-Id" : "3e5ae895-edd3-4079-9324-3dc2d35f020f",
+ "X-Ms-Request-Id" : "7ebf01a3-503c-4a49-90d5-11ee1fc3ae9d",
+ "X-Ms-Client-Request-Id" : "dd588e13-8abb-43aa-a5d2-4071a4ea8f91",
"X-Ms-Ratelimit-Remaining-Calls-Per-Second" : "30.000000",
"Content-Length" : "147",
"Body" : "{\"errors\":[{\"code\":\"MANIFEST_UNKNOWN\",\"message\":\"manifest sha256:492bc88863bdf51159c4efe84e851c48d7034881159b56c4338003e50e801598 is not found\"}]}\n",
@@ -216,4 +216,4 @@
"Exception" : null
} ],
"variables" : [ ]
-}
+}
\ No newline at end of file
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.downloadManifestDifferentType[1].json b/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.getManifestIncompatibleType[1].json
similarity index 54%
rename from sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.downloadManifestDifferentType[1].json
rename to sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.getManifestIncompatibleType[1].json
index 760a71ec8890a..aeb072118b604 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.downloadManifestDifferentType[1].json
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.getManifestIncompatibleType[1].json
@@ -3,21 +3,21 @@
"Method" : "POST",
"Uri" : "https://REDACTED.azurecr.io/oauth2/exchange?api-version=2021-07-01",
"Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.3 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "8a11bd46-e7c4-46f5-9d22-2fe269717299",
+ "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
+ "x-ms-client-request-id" : "f68ff002-13c6-48ae-8b96-4121f447ed5b",
"Content-Type" : "application/x-www-form-urlencoded"
},
"Response" : {
"Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "92bb10bb-2a5c-4eb5-a712-28250e05663c",
+ "X-Ms-Correlation-Request-Id" : "2eee301a-67e6-48b6-b839-ad872b14e869",
"Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
"Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "333.183333",
+ "x-ms-ratelimit-remaining-calls-per-second" : "332.983333",
"Connection" : "keep-alive",
"retry-after" : "0",
"StatusCode" : "200",
"Body" : "{\"refresh_token\":\"REDACTED\"}",
- "Date" : "Fri, 10 Mar 2023 02:47:59 GMT",
+ "Date" : "Thu, 16 Mar 2023 21:47:08 GMT",
"Content-Type" : "application/json; charset=utf-8"
},
"Exception" : null
@@ -25,70 +25,116 @@
"Method" : "POST",
"Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
"Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.3 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "e078ba2d-3489-494d-970d-fdbe008237bf",
+ "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
+ "x-ms-client-request-id" : "f10a862f-de75-4337-b0e7-e85feb33e490",
"Content-Type" : "application/x-www-form-urlencoded"
},
"Response" : {
"Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "6262bdc9-b9e7-4a76-b9c6-09ae1fe66d02",
+ "X-Ms-Correlation-Request-Id" : "df8d68e5-ea7b-4dba-9fc9-7d6012374037",
"Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
"Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "333.016667",
+ "x-ms-ratelimit-remaining-calls-per-second" : "333.1",
"Connection" : "keep-alive",
"retry-after" : "0",
"StatusCode" : "200",
"Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Fri, 10 Mar 2023 02:47:59 GMT",
+ "Date" : "Thu, 16 Mar 2023 21:47:08 GMT",
"Content-Type" : "application/json; charset=utf-8"
},
"Exception" : null
}, {
- "Method" : "GET",
- "Uri" : "https://REDACTED.azurecr.io/v2/library%2Fhello-world/manifests/latest",
+ "Method" : "PUT",
+ "Uri" : "https://REDACTED.azurecr.io/v2/library%2Fhello-world/manifests/sha256:5a68d6d4e86b52b9bacc57847167c33a9c90f54924d2538ef2a75281c94a7bcc",
"Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.3 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "d216e8a6-6340-4d85-92f1-baf0a1796a4d"
+ "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
+ "x-ms-client-request-id" : "78610bdb-5d44-434d-a4b2-253eb0759df1",
+ "Content-Type" : "application/vnd.oci.artifact.manifest.v1+json"
},
"Response" : {
"Server" : "openresty",
"X-Content-Type-Options" : "nosniff",
"Connection" : "keep-alive",
"retry-after" : "0",
+ "StatusCode" : "201",
+ "Date" : "Thu, 16 Mar 2023 21:47:08 GMT",
+ "Docker-Content-Digest" : "sha256:5a68d6d4e86b52b9bacc57847167c33a9c90f54924d2538ef2a75281c94a7bcc",
+ "Docker-Distribution-Api-Version" : "registry/2.0",
+ "X-Ms-Correlation-Request-Id" : "335143d9-ced4-47f0-a1fb-54a6272e14fd",
+ "Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
+ "Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
+ "X-Ms-Request-Id" : "a4d1b5e7-4ea7-4d02-aa68-11efb71912e6",
+ "X-Ms-Client-Request-Id" : "78610bdb-5d44-434d-a4b2-253eb0759df1",
+ "Content-Length" : "0",
+ "Location" : "/v2/library/hello-world/manifests/sha256:5a68d6d4e86b52b9bacc57847167c33a9c90f54924d2538ef2a75281c94a7bcc"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "POST",
+ "Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
+ "Headers" : {
+ "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
+ "x-ms-client-request-id" : "a65a99b7-d948-4fbc-a0e7-6c4e263d0f8c",
+ "Content-Type" : "application/x-www-form-urlencoded"
+ },
+ "Response" : {
+ "Transfer-Encoding" : "chunked",
+ "X-Ms-Correlation-Request-Id" : "aa66ab74-6d2a-4ee4-83be-d30aa4aae4b1",
+ "Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
+ "Server" : "openresty",
+ "x-ms-ratelimit-remaining-calls-per-second" : "332.966667",
+ "Connection" : "keep-alive",
+ "retry-after" : "0",
"StatusCode" : "200",
- "Date" : "Fri, 10 Mar 2023 02:47:59 GMT",
- "Docker-Content-Digest" : "sha256:f54a58bc1aac5ea1a25d796ae155dc228b3f0e11d046ae276b39c4bf2f13d8c4",
+ "Body" : "{\"access_token\":\"REDACTED\"}",
+ "Date" : "Thu, 16 Mar 2023 21:47:08 GMT",
+ "Content-Type" : "application/json; charset=utf-8"
+ },
+ "Exception" : null
+ }, {
+ "Method" : "GET",
+ "Uri" : "https://REDACTED.azurecr.io/v2/library%2Fhello-world/manifests/sha256:5a68d6d4e86b52b9bacc57847167c33a9c90f54924d2538ef2a75281c94a7bcc",
+ "Headers" : {
+ "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
+ "x-ms-client-request-id" : "6edad209-78a5-4610-a3f6-d04903a1090d"
+ },
+ "Response" : {
+ "Server" : "openresty",
+ "X-Content-Type-Options" : "nosniff",
+ "Connection" : "keep-alive",
+ "retry-after" : "0",
+ "StatusCode" : "404",
+ "Date" : "Thu, 16 Mar 2023 21:47:08 GMT",
"Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "b96bdded-02ba-4c72-b10e-7eb0367eaf65",
+ "X-Ms-Correlation-Request-Id" : "41706b35-2e7a-44f9-a363-76350d85d14a",
"Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
"Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "0768cbf9-b60e-49c9-9693-1d9bac941786",
- "X-Ms-Client-Request-Id" : "d216e8a6-6340-4d85-92f1-baf0a1796a4d",
- "Etag" : "\"sha256:f54a58bc1aac5ea1a25d796ae155dc228b3f0e11d046ae276b39c4bf2f13d8c4\"",
- "Content-Length" : "525",
- "Body" : "{\n \"schemaVersion\": 2,\n \"mediaType\": \"application/vnd.docker.distribution.manifest.v2+json\",\n \"config\": {\n \"mediaType\": \"application/vnd.docker.container.image.v1+json\",\n \"size\": 1469,\n \"digest\": \"sha256:feb5d9fea6a5e9606aa995e879d862b825965ba48de054caab5ef356dc6b3412\"\n },\n \"layers\": [\n {\n \"mediaType\": \"application/vnd.docker.image.rootfs.diff.tar.gzip\",\n \"size\": 2479,\n \"digest\": \"sha256:2db29710123e3e53a794f2694094b9b4338aa9ee5c40b930cb8063a1be392c54\"\n }\n ]\n}",
- "Content-Type" : "application/vnd.docker.distribution.manifest.v2+json"
+ "X-Ms-Request-Id" : "bb2d9ddc-eeff-413c-b8f6-d54995be981f",
+ "X-Ms-Client-Request-Id" : "6edad209-78a5-4610-a3f6-d04903a1090d",
+ "Content-Length" : "122",
+ "Body" : "{\"errors\":[{\"code\":\"MANIFEST_UNKNOWN\",\"message\":\"OCI artifact found, but accept header does not support OCI artifacts\"}]}\n",
+ "Content-Type" : "application/json; charset=utf-8"
},
"Exception" : null
}, {
"Method" : "POST",
"Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
"Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.3 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "5e0ee615-475c-4c45-8e45-0cfa0b14feaa",
+ "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
+ "x-ms-client-request-id" : "3df85ca5-9d1b-413c-b861-fc846d77026f",
"Content-Type" : "application/x-www-form-urlencoded"
},
"Response" : {
"Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "89cf1565-2d6c-4516-9a13-a9347cffb914",
+ "X-Ms-Correlation-Request-Id" : "4e7d6b4b-caac-4fec-b70d-5a56889faba9",
"Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
"Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "333.166667",
+ "x-ms-ratelimit-remaining-calls-per-second" : "332.95",
"Connection" : "keep-alive",
"retry-after" : "0",
"StatusCode" : "200",
"Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Fri, 10 Mar 2023 02:47:59 GMT",
+ "Date" : "Thu, 16 Mar 2023 21:47:08 GMT",
"Content-Type" : "application/json; charset=utf-8"
},
"Exception" : null
@@ -96,8 +142,8 @@
"Method" : "DELETE",
"Uri" : "https://REDACTED.azurecr.io/v2/library%2Fhello-world/blobs/sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
"Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.3 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "d8c44aba-013a-406d-8830-0eb4189b98b0"
+ "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
+ "x-ms-client-request-id" : "1acaebd3-f45c-4f23-b2cc-6bf0a9fb4fbe"
},
"Response" : {
"Server" : "openresty",
@@ -105,14 +151,14 @@
"Connection" : "keep-alive",
"retry-after" : "0",
"StatusCode" : "404",
- "Date" : "Fri, 10 Mar 2023 02:48:00 GMT",
+ "Date" : "Thu, 16 Mar 2023 21:47:08 GMT",
"Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "9daee987-ea50-427b-8937-295161dd2c61",
+ "X-Ms-Correlation-Request-Id" : "fdef5dce-78fc-4a74-996e-9ab537ef306f",
"Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
"Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "58fb4c5f-cf4a-40b0-a4dd-b1d5b29f7354",
- "X-Ms-Client-Request-Id" : "d8c44aba-013a-406d-8830-0eb4189b98b0",
- "X-Ms-Ratelimit-Remaining-Calls-Per-Second" : "32.000000",
+ "X-Ms-Request-Id" : "4d4c828f-2edc-4f73-ad51-ec1b29572a46",
+ "X-Ms-Client-Request-Id" : "1acaebd3-f45c-4f23-b2cc-6bf0a9fb4fbe",
+ "X-Ms-Ratelimit-Remaining-Calls-Per-Second" : "30.000000",
"Content-Length" : "74",
"Body" : "{\"errors\":[{\"code\":\"BLOB_UNKNOWN\",\"message\":\"blob unknown to registry\"}]}\n",
"Content-Type" : "application/json; charset=utf-8"
@@ -122,21 +168,21 @@
"Method" : "POST",
"Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
"Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.3 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "00d7eaa6-9015-47f0-b191-bfb1edc212ae",
+ "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
+ "x-ms-client-request-id" : "a30464d3-904b-438e-91bf-57621c144237",
"Content-Type" : "application/x-www-form-urlencoded"
},
"Response" : {
"Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "cacbbeb4-297a-4a48-8ad6-98a38f93168b",
+ "X-Ms-Correlation-Request-Id" : "c90110f2-78af-4207-b059-a248d159821b",
"Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
"Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "333.233333",
+ "x-ms-ratelimit-remaining-calls-per-second" : "333.083333",
"Connection" : "keep-alive",
"retry-after" : "0",
"StatusCode" : "200",
"Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Fri, 10 Mar 2023 02:48:00 GMT",
+ "Date" : "Thu, 16 Mar 2023 21:47:08 GMT",
"Content-Type" : "application/json; charset=utf-8"
},
"Exception" : null
@@ -144,8 +190,8 @@
"Method" : "DELETE",
"Uri" : "https://REDACTED.azurecr.io/v2/library%2Fhello-world/blobs/sha256:b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9",
"Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.3 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "1b7c9a70-633a-48a1-abad-46bdce8acc83"
+ "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
+ "x-ms-client-request-id" : "754dffea-1b07-473c-a810-bda1fafd2cc5"
},
"Response" : {
"Server" : "openresty",
@@ -153,13 +199,13 @@
"Connection" : "keep-alive",
"retry-after" : "0",
"StatusCode" : "404",
- "Date" : "Fri, 10 Mar 2023 02:48:00 GMT",
+ "Date" : "Thu, 16 Mar 2023 21:47:08 GMT",
"Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "9b077fe2-5254-412e-8fac-2a0cb27c252f",
+ "X-Ms-Correlation-Request-Id" : "7dde6e19-b1b6-4b48-902b-69d8f6e0c8da",
"Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
"Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "37a3bc5d-cc3e-4488-8228-083cf7d4c41c",
- "X-Ms-Client-Request-Id" : "1b7c9a70-633a-48a1-abad-46bdce8acc83",
+ "X-Ms-Request-Id" : "998c66a9-01c6-411c-843a-420190d3689b",
+ "X-Ms-Client-Request-Id" : "754dffea-1b07-473c-a810-bda1fafd2cc5",
"X-Ms-Ratelimit-Remaining-Calls-Per-Second" : "31.000000",
"Content-Length" : "74",
"Body" : "{\"errors\":[{\"code\":\"BLOB_UNKNOWN\",\"message\":\"blob unknown to registry\"}]}\n",
@@ -170,21 +216,21 @@
"Method" : "POST",
"Uri" : "https://REDACTED.azurecr.io/oauth2/token?api-version=2021-07-01",
"Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.3 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "d5ad7354-bedc-4709-a72a-e614f87787a8",
+ "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
+ "x-ms-client-request-id" : "515459c7-1698-4598-95fb-1778c046681c",
"Content-Type" : "application/x-www-form-urlencoded"
},
"Response" : {
"Transfer-Encoding" : "chunked",
- "X-Ms-Correlation-Request-Id" : "6d56bde8-aa50-4c2c-9189-394393867ec1",
+ "X-Ms-Correlation-Request-Id" : "380c2a03-9517-4bce-8b73-ddb842ace463",
"Strict-Transport-Security" : "max-age=31536000; includeSubDomains",
"Server" : "openresty",
- "x-ms-ratelimit-remaining-calls-per-second" : "333.15",
+ "x-ms-ratelimit-remaining-calls-per-second" : "332.883333",
"Connection" : "keep-alive",
"retry-after" : "0",
"StatusCode" : "200",
"Body" : "{\"access_token\":\"REDACTED\"}",
- "Date" : "Fri, 10 Mar 2023 02:48:00 GMT",
+ "Date" : "Thu, 16 Mar 2023 21:47:09 GMT",
"Content-Type" : "application/json; charset=utf-8"
},
"Exception" : null
@@ -192,8 +238,8 @@
"Method" : "DELETE",
"Uri" : "https://REDACTED.azurecr.io/v2/library%2Fhello-world/manifests/sha256:492bc88863bdf51159c4efe84e851c48d7034881159b56c4338003e50e801598",
"Headers" : {
- "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.3 (17.0.4; Windows 11; 10.0)",
- "x-ms-client-request-id" : "b84ac7c0-0e52-46ed-bdcc-954589a54949"
+ "User-Agent" : "azsdk-java-azure-containers-containerregistry/1.1.0-beta.4 (17.0.4; Windows 11; 10.0)",
+ "x-ms-client-request-id" : "4e952a5b-ba64-4ab5-b280-25f111efff66"
},
"Response" : {
"Server" : "openresty",
@@ -201,13 +247,13 @@
"Connection" : "keep-alive",
"retry-after" : "0",
"StatusCode" : "404",
- "Date" : "Fri, 10 Mar 2023 02:48:00 GMT",
+ "Date" : "Thu, 16 Mar 2023 21:47:09 GMT",
"Docker-Distribution-Api-Version" : "registry/2.0",
- "X-Ms-Correlation-Request-Id" : "27724596-cbde-4ccc-ba91-0cf39226757a",
+ "X-Ms-Correlation-Request-Id" : "1440205c-368a-4b50-a769-b5b44bf13950",
"Strict-Transport-Security" : "max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains",
"Access-Control-Expose-Headers" : "Docker-Content-Digest,WWW-Authenticate,Link,X-Ms-Correlation-Request-Id",
- "X-Ms-Request-Id" : "07386422-72de-4dd4-bcf5-f5dc33e35ba2",
- "X-Ms-Client-Request-Id" : "b84ac7c0-0e52-46ed-bdcc-954589a54949",
+ "X-Ms-Request-Id" : "ae7ef82d-9220-40d0-a5f9-2bce00aace28",
+ "X-Ms-Client-Request-Id" : "4e952a5b-ba64-4ab5-b280-25f111efff66",
"X-Ms-Ratelimit-Remaining-Calls-Per-Second" : "30.000000",
"Content-Length" : "147",
"Body" : "{\"errors\":[{\"code\":\"MANIFEST_UNKNOWN\",\"message\":\"manifest sha256:492bc88863bdf51159c4efe84e851c48d7034881159b56c4338003e50e801598 is not found\"}]}\n",
@@ -216,4 +262,4 @@
"Exception" : null
} ],
"variables" : [ ]
-}
+}
\ No newline at end of file
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.downloadManifestListManifestAsync[1].json b/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.getManifestListManifestAsync[1].json
similarity index 100%
rename from sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.downloadManifestListManifestAsync[1].json
rename to sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.getManifestListManifestAsync[1].json
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.downloadManifestListManifest[1].json b/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.getManifestListManifest[1].json
similarity index 100%
rename from sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.downloadManifestListManifest[1].json
rename to sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.getManifestListManifest[1].json
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.downloadManifest[1].json b/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.getManifest[1].json
similarity index 100%
rename from sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.downloadManifest[1].json
rename to sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.getManifest[1].json
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.uploadManifest[1].json b/sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.setManifest[1].json
similarity index 100%
rename from sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryBlobClientIntegrationTests.uploadManifest[1].json
rename to sdk/containerregistry/azure-containers-containerregistry/src/test/resources/session-records/ContainerRegistryContentClientIntegrationTests.setManifest[1].json
diff --git a/sdk/containerregistry/azure-containers-containerregistry/swagger/autorest.md b/sdk/containerregistry/azure-containers-containerregistry/swagger/autorest.md
index ff5c12ebf4c89..d34871b719c52 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/swagger/autorest.md
+++ b/sdk/containerregistry/azure-containers-containerregistry/swagger/autorest.md
@@ -96,6 +96,15 @@ directive:
$["x-ms-enum"].modelAsString = true;
```
+### Remove "Authentication_GetAcrAccessTokenFromLogin" operation as the service team discourage using username/password to authenticate.
+```yaml
+directive:
+ - from: swagger-document
+ where: $["paths"]["/oauth2/token"]
+ transform: >
+ delete $.get
+```
+
### Update the field names for RepositoryChangeableAttributes
```yaml
directive:
@@ -163,6 +172,9 @@ directive:
```
### Set readonly flag to properties of TagAttributesBase
+
+
+
```yaml
directive:
- from: swagger-document
@@ -176,6 +188,9 @@ directive:
```
### Update the field names for TagChangeableAttributes
+
+
+
```yaml
directive:
- from: swagger-document
@@ -186,6 +201,7 @@ directive:
$["properties"]["listEnabled"]["x-ms-client-name"] = "listEnabled";
$["properties"]["readEnabled"]["x-ms-client-name"] = "readEnabled";
```
+
# Add content-type parameter
```yaml
directive:
@@ -230,10 +246,10 @@ directive:
delete $["x-accessibility"];
delete $["allOf"];
$.properties["schemaVersion"] = {
- "type": "integer",
- "description": "Schema version",
- "x-ms-client-default": 2
- };
+ "type": "integer",
+ "description": "Schema version"
+ };
+ $.properties.config["x-ms-client-name"] = "configuration";
```
# Take stream as manifest body
@@ -248,7 +264,10 @@ directive:
}
```
-# Replace ManifestWrapper with stream response to calculate MD5
+# Replace ManifestWrapper with stream response to calculate SHA256
+
+
+
```yaml
directive:
from: swagger-document
@@ -257,7 +276,7 @@ directive:
$.schema = {
"type": "string",
"format": "binary"
- }
+ };
```
# Rename ArtifactBlobDescriptor to OciDescriptor
@@ -280,3 +299,27 @@ directive:
$["x-ms-client-name"] = "OciAnnotations";
delete $["x-accessibility"]
```
+
+# Rename created to createdOn in OciAnnotations
+```yaml
+directive:
+ from: swagger-document
+ where: $.definitions.Annotations
+ transform: >
+ $.properties["org.opencontainers.image.created"] = {
+ "description": "Date and time on which the image was built (string, date-time as defined by https://tools.ietf.org/html/rfc3339#section-5.6)",
+ "type": "string",
+ "format": "date-time",
+ "x-ms-client-name": "CreatedOn"
+ };
+```
+
+# Remove security definitions
+``` yaml
+directive:
+- from: swagger-document
+ where: $.
+ transform: >
+ delete $["securityDefinitions"];
+ delete $["security"];
+```
From ca6b912f199ecace5983bfa1bf762079d5b7d2c7 Mon Sep 17 00:00:00 2001
From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Date: Tue, 28 Mar 2023 20:04:22 -0700
Subject: [PATCH 4/5] [Automation] Generate Fluent Lite from
newrelic#package-2022-07-01-preview (#34208)
* [Automation] External Change
* [Automation] Generate Fluent Lite from newrelic#package-2022-07-01-preview
---
eng/mgmt/automation/api-specs.yaml | 2 +
eng/versioning/version_client.txt | 1 +
pom.xml | 1 +
.../CHANGELOG.md | 5 +
.../README.md | 105 +
.../SAMPLE.md | 1075 ++++++
.../pom.xml | 97 +
.../NewRelicObservabilityManager.java | 363 ++
.../fluent/AccountsClient.java | 41 +
.../fluent/MonitorsClient.java | 467 +++
.../fluent/NewRelicObservability.java | 88 +
.../fluent/OperationsClient.java | 38 +
.../fluent/OrganizationsClient.java | 41 +
.../fluent/PlansClient.java | 38 +
.../fluent/TagRulesClient.java | 236 ++
.../fluent/models/AccountProperties.java | 128 +
.../fluent/models/AccountResourceInner.java | 151 +
.../fluent/models/AppServiceInfoInner.java | 102 +
.../fluent/models/MetricRulesInner.java | 108 +
.../models/MetricsStatusResponseInner.java | 51 +
.../fluent/models/MonitorProperties.java | 262 ++
.../fluent/models/MonitoredResourceInner.java | 158 +
.../MonitoringTagRulesPropertiesInner.java | 99 +
.../models/NewRelicMonitorResourceInner.java | 291 ++
...wRelicMonitorResourceUpdateProperties.java | 170 +
.../fluent/models/OperationInner.java | 127 +
.../fluent/models/OrganizationProperties.java | 103 +
.../models/OrganizationResourceInner.java | 129 +
.../fluent/models/PlanDataProperties.java | 108 +
.../fluent/models/PlanDataResourceInner.java | 131 +
.../fluent/models/TagRuleInner.java | 123 +
.../fluent/models/TagRuleUpdateInner.java | 89 +
.../models/TagRuleUpdatePropertiesInner.java | 83 +
.../models/VMExtensionPayloadInner.java | 50 +
.../fluent/models/VMInfoInner.java | 102 +
.../fluent/models/package-info.java | 6 +
.../fluent/package-info.java | 6 +
.../implementation/AccountResourceImpl.java | 62 +
.../implementation/AccountsClientImpl.java | 332 ++
.../implementation/AccountsImpl.java | 46 +
.../implementation/AppServiceInfoImpl.java | 41 +
.../implementation/MetricRulesImpl.java | 50 +
.../MetricsStatusResponseImpl.java | 40 +
.../implementation/MonitoredResourceImpl.java | 51 +
.../MonitoringTagRulesPropertiesImpl.java | 50 +
.../implementation/MonitorsClientImpl.java | 3052 +++++++++++++++++
.../implementation/MonitorsImpl.java | 272 ++
.../NewRelicMonitorResourceImpl.java | 372 ++
.../NewRelicObservabilityBuilder.java | 144 +
.../NewRelicObservabilityImpl.java | 360 ++
.../implementation/OperationImpl.java | 52 +
.../implementation/OperationsClientImpl.java | 276 ++
.../implementation/OperationsImpl.java | 46 +
.../OrganizationResourceImpl.java | 59 +
.../OrganizationsClientImpl.java | 333 ++
.../implementation/OrganizationsImpl.java | 46 +
.../implementation/PlanDataResourceImpl.java | 61 +
.../implementation/PlansClientImpl.java | 334 ++
.../implementation/PlansImpl.java | 46 +
.../implementation/TagRuleImpl.java | 184 +
.../implementation/TagRuleUpdateImpl.java | 45 +
.../TagRuleUpdatePropertiesImpl.java | 45 +
.../implementation/TagRulesClientImpl.java | 1289 +++++++
.../implementation/TagRulesImpl.java | 191 ++
.../implementation/Utils.java | 204 ++
.../VMExtensionPayloadImpl.java | 33 +
.../implementation/VMInfoImpl.java | 41 +
.../implementation/package-info.java | 6 +
.../models/AccountCreationSource.java | 47 +
.../models/AccountInfo.java | 102 +
.../models/AccountResource.java | 74 +
.../models/Accounts.java | 36 +
.../models/AccountsListResponse.java | 88 +
.../models/ActionType.java | 44 +
.../models/AppServiceInfo.java | 38 +
.../models/AppServicesGetRequest.java | 85 +
.../models/AppServicesListResponse.java | 88 +
.../models/BillingCycle.java | 50 +
.../models/BillingSource.java | 47 +
.../models/FilteringTag.java | 105 +
.../models/HostsGetRequest.java | 85 +
.../models/LiftrResourceCategories.java | 47 +
.../models/LogRules.java | 145 +
.../models/ManagedServiceIdentity.java | 143 +
.../models/ManagedServiceIdentityType.java | 54 +
.../models/MarketplaceSubscriptionStatus.java | 50 +
.../models/MetricRules.java | 39 +
.../models/MetricsRequest.java | 58 +
.../models/MetricsStatusRequest.java | 85 +
.../models/MetricsStatusResponse.java | 25 +
.../models/MonitoredResource.java | 53 +
.../models/MonitoredResourceListResponse.java | 89 +
.../models/MonitoringStatus.java | 47 +
.../models/MonitoringTagRulesProperties.java | 39 +
.../models/Monitors.java | 335 ++
.../models/NewRelicAccountProperties.java | 137 +
.../models/NewRelicMonitorResource.java | 583 ++++
.../NewRelicMonitorResourceListResult.java | 89 +
.../models/NewRelicMonitorResourceUpdate.java | 217 ++
.../NewRelicSingleSignOnProperties.java | 128 +
.../models/Operation.java | 56 +
.../models/OperationDisplay.java | 91 +
.../models/OperationListResult.java | 62 +
.../models/Operations.java | 33 +
.../models/OrgCreationSource.java | 47 +
.../models/OrganizationInfo.java | 50 +
.../models/OrganizationResource.java | 67 +
.../models/Organizations.java | 36 +
.../models/OrganizationsListResponse.java | 88 +
.../newrelicobservability/models/Origin.java | 53 +
.../models/PlanData.java | 129 +
.../models/PlanDataListResponse.java | 88 +
.../models/PlanDataResource.java | 67 +
.../newrelicobservability/models/Plans.java | 33 +
.../models/ProvisioningState.java | 68 +
.../models/SendAadLogsStatus.java | 47 +
.../models/SendActivityLogsStatus.java | 47 +
.../models/SendMetricsStatus.java | 47 +
.../models/SendSubscriptionLogsStatus.java | 47 +
.../models/SendingLogsStatus.java | 47 +
.../models/SendingMetricsStatus.java | 47 +
.../models/SingleSignOnStates.java | 53 +
.../models/SwitchBillingRequest.java | 139 +
.../models/TagAction.java | 47 +
.../newrelicobservability/models/TagRule.java | 199 ++
.../models/TagRuleListResult.java | 88 +
.../models/TagRuleUpdate.java | 31 +
.../models/TagRuleUpdateProperties.java | 31 +
.../models/TagRules.java | 142 +
.../models/UsageType.java | 47 +
.../models/UserAssignedIdentity.java | 55 +
.../models/UserInfo.java | 154 +
.../models/VMExtensionPayload.java | 24 +
.../models/VMHostsListResponse.java | 88 +
.../newrelicobservability/models/VMInfo.java | 38 +
.../models/package-info.java | 6 +
.../newrelicobservability/package-info.java | 6 +
.../src/main/java/module-info.java | 19 +
.../generated/AccountsListSamples.java | 34 +
.../MonitorsCreateOrUpdateSamples.java | 91 +
.../generated/MonitorsDeleteSamples.java | 40 +
.../MonitorsGetByResourceGroupSamples.java | 21 +
.../MonitorsGetMetricRulesSamples.java | 48 +
.../MonitorsGetMetricStatusSamples.java | 51 +
.../MonitorsListAppServicesSamples.java | 51 +
.../MonitorsListByResourceGroupSamples.java | 21 +
.../generated/MonitorsListHostsSamples.java | 53 +
...MonitorsListMonitoredResourcesSamples.java | 38 +
.../generated/MonitorsListSamples.java | 21 +
.../MonitorsSwitchBillingSamples.java | 61 +
.../generated/MonitorsUpdateSamples.java | 94 +
.../MonitorsVmHostPayloadSamples.java | 38 +
.../generated/OperationsListSamples.java | 34 +
.../generated/OrganizationsListSamples.java | 34 +
.../generated/PlansListSamples.java | 34 +
.../TagRulesCreateOrUpdateSamples.java | 73 +
.../generated/TagRulesDeleteSamples.java | 46 +
.../generated/TagRulesGetSamples.java | 46 +
...sListByNewRelicMonitorResourceSamples.java | 40 +
.../generated/TagRulesUpdateSamples.java | 86 +
.../generated/AccountPropertiesTests.java | 39 +
.../generated/AccountResourceInnerTests.java | 39 +
.../generated/AccountsListMockTests.java | 71 +
.../generated/AccountsListResponseTests.java | 48 +
.../generated/AppServiceInfoInnerTests.java | 36 +
.../generated/AppServicesGetRequestTests.java | 31 +
.../AppServicesListResponseTests.java | 49 +
.../generated/FilteringTagTests.java | 33 +
.../generated/HostsGetRequestTests.java | 31 +
.../generated/LogRulesTests.java | 61 +
.../ManagedServiceIdentityTests.java | 47 +
.../generated/MetricRulesInnerTests.java | 53 +
.../generated/MetricsRequestTests.java | 24 +
.../generated/MetricsStatusRequestTests.java | 34 +
.../MetricsStatusResponseInnerTests.java | 26 +
.../MonitoredResourceInnerTests.java | 44 +
.../MonitoredResourceListResponseTests.java | 71 +
...onitoringTagRulesPropertiesInnerTests.java | 97 +
.../MonitorsCreateOrUpdateMockTests.java | 130 +
.../generated/MonitorsDeleteMockTests.java | 61 +
...tByResourceGroupWithResponseMockTests.java | 89 +
...rsGetMetricRulesWithResponseMockTests.java | 81 +
...sGetMetricStatusWithResponseMockTests.java | 77 +
.../MonitorsListAppServicesMockTests.java | 80 +
.../MonitorsListByResourceGroupMockTests.java | 89 +
.../generated/MonitorsListHostsMockTests.java | 79 +
.../generated/MonitorsListMockTests.java | 88 +
...nitorsListMonitoredResourcesMockTests.java | 74 +
...orsSwitchBillingWithResponseMockTests.java | 80 +
.../NewRelicMonitorResourceInnerTests.java | 112 +
...ewRelicMonitorResourceListResultTests.java | 105 +
.../NewRelicMonitorResourceUpdateTests.java | 101 +
.../NewRelicSingleSignOnPropertiesTests.java | 41 +
.../generated/OperationDisplayTests.java | 25 +
.../generated/OperationInnerTests.java | 26 +
.../generated/OperationListResultTests.java | 25 +
.../generated/OperationsListMockTests.java | 64 +
.../generated/OrganizationInfoTests.java | 24 +
.../OrganizationPropertiesTests.java | 37 +
.../OrganizationResourceInnerTests.java | 37 +
.../generated/OrganizationsListMockTests.java | 71 +
.../OrganizationsListResponseTests.java | 54 +
.../generated/PlanDataListResponseTests.java | 44 +
.../generated/PlanDataPropertiesTests.java | 53 +
.../generated/PlanDataResourceInnerTests.java | 53 +
.../generated/PlanDataTests.java | 42 +
.../generated/PlansListMockTests.java | 79 +
.../generated/SwitchBillingRequestTests.java | 54 +
.../generated/TagRuleInnerTests.java | 55 +
.../generated/TagRuleListResultTests.java | 33 +
.../generated/TagRuleUpdateInnerTests.java | 55 +
.../TagRuleUpdatePropertiesInnerTests.java | 93 +
.../TagRulesCreateOrUpdateMockTests.java | 93 +
.../generated/TagRulesDeleteMockTests.java | 61 +
.../TagRulesGetWithResponseMockTests.java | 78 +
...istByNewRelicMonitorResourceMockTests.java | 81 +
.../generated/UserAssignedIdentityTests.java | 25 +
.../generated/UserInfoTests.java | 42 +
.../generated/VMHostsListResponseTests.java | 45 +
.../generated/VMInfoInnerTests.java | 31 +
.../org.mockito.plugins.MockMaker | 1 +
sdk/newrelicobservability/ci.yml | 47 +
sdk/newrelicobservability/pom.xml | 15 +
223 files changed, 23626 insertions(+)
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/CHANGELOG.md
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/README.md
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/SAMPLE.md
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/pom.xml
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/NewRelicObservabilityManager.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/AccountsClient.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/MonitorsClient.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/NewRelicObservability.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/OperationsClient.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/OrganizationsClient.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/PlansClient.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/TagRulesClient.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/AccountProperties.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/AccountResourceInner.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/AppServiceInfoInner.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MetricRulesInner.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MetricsStatusResponseInner.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MonitorProperties.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MonitoredResourceInner.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MonitoringTagRulesPropertiesInner.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/NewRelicMonitorResourceInner.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/NewRelicMonitorResourceUpdateProperties.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/OperationInner.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/OrganizationProperties.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/OrganizationResourceInner.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/PlanDataProperties.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/PlanDataResourceInner.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/TagRuleInner.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/TagRuleUpdateInner.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/TagRuleUpdatePropertiesInner.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/VMExtensionPayloadInner.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/VMInfoInner.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/package-info.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/package-info.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/AccountResourceImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/AccountsClientImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/AccountsImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/AppServiceInfoImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MetricRulesImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MetricsStatusResponseImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredResourceImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoringTagRulesPropertiesImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitorsClientImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitorsImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/NewRelicMonitorResourceImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/NewRelicObservabilityBuilder.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/NewRelicObservabilityImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/OperationImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/OperationsClientImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/OperationsImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/OrganizationResourceImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/OrganizationsClientImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/OrganizationsImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/PlanDataResourceImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/PlansClientImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/PlansImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/TagRuleImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/TagRuleUpdateImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/TagRuleUpdatePropertiesImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/TagRulesClientImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/TagRulesImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/Utils.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/VMExtensionPayloadImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/VMInfoImpl.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/package-info.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/AccountCreationSource.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/AccountInfo.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/AccountResource.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Accounts.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/AccountsListResponse.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ActionType.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/AppServiceInfo.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/AppServicesGetRequest.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/AppServicesListResponse.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/BillingCycle.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/BillingSource.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/FilteringTag.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/HostsGetRequest.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/LiftrResourceCategories.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/LogRules.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ManagedServiceIdentity.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ManagedServiceIdentityType.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MarketplaceSubscriptionStatus.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MetricRules.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MetricsRequest.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MetricsStatusRequest.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MetricsStatusResponse.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoredResource.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoredResourceListResponse.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoringStatus.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoringTagRulesProperties.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Monitors.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/NewRelicAccountProperties.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/NewRelicMonitorResource.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/NewRelicMonitorResourceListResult.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/NewRelicMonitorResourceUpdate.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/NewRelicSingleSignOnProperties.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Operation.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/OperationDisplay.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/OperationListResult.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Operations.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/OrgCreationSource.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/OrganizationInfo.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/OrganizationResource.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Organizations.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/OrganizationsListResponse.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Origin.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/PlanData.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/PlanDataListResponse.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/PlanDataResource.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Plans.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ProvisioningState.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SendAadLogsStatus.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SendActivityLogsStatus.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SendMetricsStatus.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SendSubscriptionLogsStatus.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SendingLogsStatus.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SendingMetricsStatus.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SingleSignOnStates.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SwitchBillingRequest.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/TagAction.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/TagRule.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/TagRuleListResult.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/TagRuleUpdate.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/TagRuleUpdateProperties.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/TagRules.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/UsageType.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/UserAssignedIdentity.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/UserInfo.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/VMExtensionPayload.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/VMHostsListResponse.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/VMInfo.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/package-info.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/package-info.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/module-info.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/AccountsListSamples.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsCreateOrUpdateSamples.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsDeleteSamples.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetByResourceGroupSamples.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricRulesSamples.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricStatusSamples.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListAppServicesSamples.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListByResourceGroupSamples.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListHostsSamples.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListMonitoredResourcesSamples.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListSamples.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsSwitchBillingSamples.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsUpdateSamples.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsVmHostPayloadSamples.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/OperationsListSamples.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListSamples.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/PlansListSamples.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesCreateOrUpdateSamples.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesDeleteSamples.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesGetSamples.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesListByNewRelicMonitorResourceSamples.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesUpdateSamples.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AccountPropertiesTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AccountResourceInnerTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AccountsListMockTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AccountsListResponseTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServiceInfoInnerTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServicesGetRequestTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServicesListResponseTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/FilteringTagTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/HostsGetRequestTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LogRulesTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ManagedServiceIdentityTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricRulesInnerTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsRequestTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsStatusRequestTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsStatusResponseInnerTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredResourceInnerTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredResourceListResponseTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoringTagRulesPropertiesInnerTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsCreateOrUpdateMockTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsDeleteMockTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetByResourceGroupWithResponseMockTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricRulesWithResponseMockTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricStatusWithResponseMockTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListAppServicesMockTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListByResourceGroupMockTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListHostsMockTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListMockTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListMonitoredResourcesMockTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsSwitchBillingWithResponseMockTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/NewRelicMonitorResourceInnerTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/NewRelicMonitorResourceListResultTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/NewRelicMonitorResourceUpdateTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/NewRelicSingleSignOnPropertiesTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OperationDisplayTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OperationInnerTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OperationListResultTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OperationsListMockTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationInfoTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationPropertiesTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationResourceInnerTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListMockTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListResponseTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataListResponseTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataPropertiesTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataResourceInnerTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlansListMockTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SwitchBillingRequestTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleInnerTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleListResultTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleUpdateInnerTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleUpdatePropertiesInnerTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesCreateOrUpdateMockTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesDeleteMockTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesGetWithResponseMockTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesListByNewRelicMonitorResourceMockTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/UserAssignedIdentityTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/UserInfoTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/VMHostsListResponseTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/VMInfoInnerTests.java
create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
create mode 100644 sdk/newrelicobservability/ci.yml
create mode 100644 sdk/newrelicobservability/pom.xml
diff --git a/eng/mgmt/automation/api-specs.yaml b/eng/mgmt/automation/api-specs.yaml
index ec6e79a12d1c5..806096a3344fb 100644
--- a/eng/mgmt/automation/api-specs.yaml
+++ b/eng/mgmt/automation/api-specs.yaml
@@ -65,6 +65,8 @@ mysql:
service: mysqlflexibleserver
network:
suffix: generated
+newrelic:
+ service: newrelicobservability
operationalinsights:
service: loganalytics
postgresql:
diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 7ce31cafa3527..291a00d988937 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -401,6 +401,7 @@ com.azure.resourcemanager:azure-resourcemanager-storagemover;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-containerservicefleet;1.0.0-beta.1;1.0.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-voiceservices;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-graphservices;1.0.0-beta.1;1.0.0-beta.2
+com.azure.resourcemanager:azure-resourcemanager-newrelicobservability;1.0.0-beta.1;1.0.0-beta.1
com.azure.tools:azure-sdk-archetype;1.0.0;1.2.0-beta.1
com.azure.tools:azure-sdk-build-tool;1.0.0-beta.1;1.0.0-beta.2
diff --git a/pom.xml b/pom.xml
index 4d9066affde57..82e5754df1873 100644
--- a/pom.xml
+++ b/pom.xml
@@ -121,6 +121,7 @@
sdk/mysqlflexibleserver
sdk/netapp
sdk/networkfunction
+ sdk/newrelicobservability
sdk/nginx
sdk/notificationhubs
sdk/oep
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/CHANGELOG.md b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/CHANGELOG.md
new file mode 100644
index 0000000000000..16c6c2f86bfb8
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Release History
+
+## 1.0.0-beta.1 (2023-03-27)
+
+- Azure Resource Manager NewRelicObservability client library for Java. This package contains Microsoft Azure SDK for NewRelicObservability Management SDK. Package tag package-2022-07-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/newrelicobservability/azure-resourcemanager-newrelicobservability/README.md b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/README.md
new file mode 100644
index 0000000000000..262df73c45869
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/README.md
@@ -0,0 +1,105 @@
+# Azure Resource Manager NewRelicObservability client library for Java
+
+Azure Resource Manager NewRelicObservability client library for Java.
+
+This package contains Microsoft Azure SDK for NewRelicObservability Management SDK. Package tag package-2022-07-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
+
+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-newrelicobservability;current})
+```xml
+
+ com.azure.resourcemanager
+ azure-resourcemanager-newrelicobservability
+ 1.0.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, 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 `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();
+NewRelicObservabilityManager manager = NewRelicObservabilityManager
+ .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/newrelicobservability/azure-resourcemanager-newrelicobservability/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://docs.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
+[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/newrelicobservability/azure-resourcemanager-newrelicobservability/SAMPLE.md b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/SAMPLE.md
new file mode 100644
index 0000000000000..b736dbce1080d
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/SAMPLE.md
@@ -0,0 +1,1075 @@
+# Code snippets and samples
+
+
+## Accounts
+
+- [List](#accounts_list)
+
+## Monitors
+
+- [CreateOrUpdate](#monitors_createorupdate)
+- [Delete](#monitors_delete)
+- [GetByResourceGroup](#monitors_getbyresourcegroup)
+- [GetMetricRules](#monitors_getmetricrules)
+- [GetMetricStatus](#monitors_getmetricstatus)
+- [List](#monitors_list)
+- [ListAppServices](#monitors_listappservices)
+- [ListByResourceGroup](#monitors_listbyresourcegroup)
+- [ListHosts](#monitors_listhosts)
+- [ListMonitoredResources](#monitors_listmonitoredresources)
+- [SwitchBilling](#monitors_switchbilling)
+- [Update](#monitors_update)
+- [VmHostPayload](#monitors_vmhostpayload)
+
+## Operations
+
+- [List](#operations_list)
+
+## Organizations
+
+- [List](#organizations_list)
+
+## Plans
+
+- [List](#plans_list)
+
+## TagRules
+
+- [CreateOrUpdate](#tagrules_createorupdate)
+- [Delete](#tagrules_delete)
+- [Get](#tagrules_get)
+- [ListByNewRelicMonitorResource](#tagrules_listbynewrelicmonitorresource)
+- [Update](#tagrules_update)
+### Accounts_List
+
+```java
+/** Samples for Accounts List. */
+public final class AccountsListSamples {
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Accounts_List_MinimumSet_Gen.json
+ */
+ /**
+ * Sample code: Accounts_List_MinimumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void accountsListMinimumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager.accounts().list("ruxvg@xqkmdhrnoo.hlmbpm", "egh", com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Accounts_List_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: Accounts_List_MaximumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void accountsListMaximumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager.accounts().list("ruxvg@xqkmdhrnoo.hlmbpm", "egh", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Monitors_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.newrelicobservability.models.AccountCreationSource;
+import com.azure.resourcemanager.newrelicobservability.models.AccountInfo;
+import com.azure.resourcemanager.newrelicobservability.models.BillingCycle;
+import com.azure.resourcemanager.newrelicobservability.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.newrelicobservability.models.ManagedServiceIdentityType;
+import com.azure.resourcemanager.newrelicobservability.models.NewRelicAccountProperties;
+import com.azure.resourcemanager.newrelicobservability.models.NewRelicSingleSignOnProperties;
+import com.azure.resourcemanager.newrelicobservability.models.OrgCreationSource;
+import com.azure.resourcemanager.newrelicobservability.models.OrganizationInfo;
+import com.azure.resourcemanager.newrelicobservability.models.PlanData;
+import com.azure.resourcemanager.newrelicobservability.models.ProvisioningState;
+import com.azure.resourcemanager.newrelicobservability.models.SingleSignOnStates;
+import com.azure.resourcemanager.newrelicobservability.models.UsageType;
+import com.azure.resourcemanager.newrelicobservability.models.UserAssignedIdentity;
+import com.azure.resourcemanager.newrelicobservability.models.UserInfo;
+import java.time.OffsetDateTime;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Monitors CreateOrUpdate. */
+public final class MonitorsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_CreateOrUpdate_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: Monitors_CreateOrUpdate_MaximumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void monitorsCreateOrUpdateMaximumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager
+ .monitors()
+ .define("cdlymktqw")
+ .withRegion("k")
+ .withExistingResourceGroup("rgNewRelic")
+ .withTags(mapOf("key6976", "oaxfhf"))
+ .withIdentity(
+ new ManagedServiceIdentity()
+ .withType(ManagedServiceIdentityType.NONE)
+ .withUserAssignedIdentities(mapOf("key8903", new UserAssignedIdentity())))
+ .withNewRelicAccountProperties(
+ new NewRelicAccountProperties()
+ .withUserId("vcscxlncofcuduadesd")
+ .withAccountInfo(
+ new AccountInfo()
+ .withAccountId("xhqmg")
+ .withIngestionKey("fakeTokenPlaceholder")
+ .withRegion("ljcf"))
+ .withOrganizationInfo(new OrganizationInfo().withOrganizationId("k"))
+ .withSingleSignOnProperties(
+ new NewRelicSingleSignOnProperties()
+ .withSingleSignOnState(SingleSignOnStates.INITIAL)
+ .withEnterpriseAppId("kwiwfz")
+ .withSingleSignOnUrl("kvseueuljsxmfwpqctz")
+ .withProvisioningState(ProvisioningState.ACCEPTED)))
+ .withUserInfo(
+ new UserInfo()
+ .withFirstName("vdftzcggirefejajwahhwhyibutramdaotvnuf")
+ .withLastName("bcsztgqovdlmzfkjdrngidwzqsevagexzzilnlc")
+ .withEmailAddress("%6%@4-g.N1.3F-kI1.Ue-.lJso")
+ .withPhoneNumber("krf")
+ .withCountry("hslqnwdanrconqyekwbnttaetv"))
+ .withPlanData(
+ new PlanData()
+ .withUsageType(UsageType.PAYG)
+ .withBillingCycle(BillingCycle.YEARLY)
+ .withPlanDetails("tbbiaga")
+ .withEffectiveDate(OffsetDateTime.parse("2022-12-05T14:11:37.786Z")))
+ .withOrgCreationSource(OrgCreationSource.LIFTR)
+ .withAccountCreationSource(AccountCreationSource.LIFTR)
+ .create();
+ }
+
+ @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;
+ }
+}
+```
+
+### Monitors_Delete
+
+```java
+/** Samples for Monitors Delete. */
+public final class MonitorsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_Delete_MinimumSet_Gen.json
+ */
+ /**
+ * Sample code: Monitors_Delete_MinimumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void monitorsDeleteMinimumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager.monitors().delete("rgopenapi", null, "ipxmlcbonyxtolzejcjshkmlron", com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_Delete_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: Monitors_Delete_MaximumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void monitorsDeleteMaximumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager
+ .monitors()
+ .delete(
+ "rgopenapi",
+ "ruxvg@xqkmdhrnoo.hlmbpm",
+ "ipxmlcbonyxtolzejcjshkmlron",
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Monitors_GetByResourceGroup
+
+```java
+/** Samples for Monitors GetByResourceGroup. */
+public final class MonitorsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_Get_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: Monitors_Get_MaximumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void monitorsGetMaximumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager.monitors().getByResourceGroupWithResponse("rgNewRelic", "cdlymktqw", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Monitors_GetMetricRules
+
+```java
+import com.azure.resourcemanager.newrelicobservability.models.MetricsRequest;
+
+/** Samples for Monitors GetMetricRules. */
+public final class MonitorsGetMetricRulesSamples {
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_GetMetricRules_MinimumSet_Gen.json
+ */
+ /**
+ * Sample code: Monitors_GetMetricRules_MinimumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void monitorsGetMetricRulesMinimumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager
+ .monitors()
+ .getMetricRulesWithResponse(
+ "rgNewRelic",
+ "fhcjxnxumkdlgpwanewtkdnyuz",
+ new MetricsRequest().withUserEmail("ruxvg@xqkmdhrnoo.hlmbpm"),
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_GetMetricRules_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: Monitors_GetMetricRules_MaximumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void monitorsGetMetricRulesMaximumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager
+ .monitors()
+ .getMetricRulesWithResponse(
+ "rgNewRelic",
+ "fhcjxnxumkdlgpwanewtkdnyuz",
+ new MetricsRequest().withUserEmail("ruxvg@xqkmdhrnoo.hlmbpm"),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Monitors_GetMetricStatus
+
+```java
+import com.azure.resourcemanager.newrelicobservability.models.MetricsStatusRequest;
+import java.util.Arrays;
+
+/** Samples for Monitors GetMetricStatus. */
+public final class MonitorsGetMetricStatusSamples {
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_GetMetricStatus_MinimumSet_Gen.json
+ */
+ /**
+ * Sample code: Monitors_GetMetricStatus_MinimumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void monitorsGetMetricStatusMinimumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager
+ .monitors()
+ .getMetricStatusWithResponse(
+ "rgNewRelic",
+ "fhcjxnxumkdlgpwanewtkdnyuz",
+ new MetricsStatusRequest().withUserEmail("ruxvg@xqkmdhrnoo.hlmbpm"),
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_GetMetricStatus_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: Monitors_GetMetricStatus_MaximumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void monitorsGetMetricStatusMaximumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager
+ .monitors()
+ .getMetricStatusWithResponse(
+ "rgNewRelic",
+ "fhcjxnxumkdlgpwanewtkdnyuz",
+ new MetricsStatusRequest()
+ .withAzureResourceIds(Arrays.asList("enfghpfw"))
+ .withUserEmail("ruxvg@xqkmdhrnoo.hlmbpm"),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Monitors_List
+
+```java
+/** Samples for Monitors List. */
+public final class MonitorsListSamples {
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_ListBySubscription_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: Monitors_ListBySubscription_MaximumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void monitorsListBySubscriptionMaximumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager.monitors().list(com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Monitors_ListAppServices
+
+```java
+import com.azure.resourcemanager.newrelicobservability.models.AppServicesGetRequest;
+import java.util.Arrays;
+
+/** Samples for Monitors ListAppServices. */
+public final class MonitorsListAppServicesSamples {
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_ListAppServices_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: Monitors_ListAppServices_MaximumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void monitorsListAppServicesMaximumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager
+ .monitors()
+ .listAppServices(
+ "rgNewRelic",
+ "fhcjxnxumkdlgpwanewtkdnyuz",
+ new AppServicesGetRequest()
+ .withAzureResourceIds(Arrays.asList("pvzrksrmzowobuhxpwiotnpcvjbu"))
+ .withUserEmail("ruxvg@xqkmdhrnoo.hlmbpm"),
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_ListAppServices_MinimumSet_Gen.json
+ */
+ /**
+ * Sample code: Monitors_ListAppServices_MinimumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void monitorsListAppServicesMinimumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager
+ .monitors()
+ .listAppServices(
+ "rgNewRelic",
+ "fhcjxnxumkdlgpwanewtkdnyuz",
+ new AppServicesGetRequest().withUserEmail("ruxvg@xqkmdhrnoo.hlmbpm"),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Monitors_ListByResourceGroup
+
+```java
+/** Samples for Monitors ListByResourceGroup. */
+public final class MonitorsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_ListByResourceGroup_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: Monitors_ListByResourceGroup_MaximumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void monitorsListByResourceGroupMaximumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager.monitors().listByResourceGroup("rgNewRelic", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Monitors_ListHosts
+
+```java
+import com.azure.resourcemanager.newrelicobservability.models.HostsGetRequest;
+import java.util.Arrays;
+
+/** Samples for Monitors ListHosts. */
+public final class MonitorsListHostsSamples {
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_ListHosts_MinimumSet_Gen.json
+ */
+ /**
+ * Sample code: Monitors_ListHosts_MinimumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void monitorsListHostsMinimumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager
+ .monitors()
+ .listHosts(
+ "rgopenapi",
+ "ipxmlcbonyxtolzejcjshkmlron",
+ new HostsGetRequest()
+ .withVmIds(Arrays.asList("xzphvxvfmvjrnsgyns"))
+ .withUserEmail("ruxvg@xqkmdhrnoo.hlmbpm"),
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_ListHosts_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: Monitors_ListHosts_MaximumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void monitorsListHostsMaximumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager
+ .monitors()
+ .listHosts(
+ "rgopenapi",
+ "ipxmlcbonyxtolzejcjshkmlron",
+ new HostsGetRequest()
+ .withVmIds(Arrays.asList("xzphvxvfmvjrnsgyns"))
+ .withUserEmail("ruxvg@xqkmdhrnoo.hlmbpm"),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Monitors_ListMonitoredResources
+
+```java
+/** Samples for Monitors ListMonitoredResources. */
+public final class MonitorsListMonitoredResourcesSamples {
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_ListMonitoredResources_MinimumSet_Gen.json
+ */
+ /**
+ * Sample code: Monitors_ListMonitoredResources_MinimumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void monitorsListMonitoredResourcesMinimumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager
+ .monitors()
+ .listMonitoredResources("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_ListMonitoredResources_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: Monitors_ListMonitoredResources_MaximumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void monitorsListMonitoredResourcesMaximumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager
+ .monitors()
+ .listMonitoredResources("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Monitors_SwitchBilling
+
+```java
+import com.azure.resourcemanager.newrelicobservability.models.BillingCycle;
+import com.azure.resourcemanager.newrelicobservability.models.PlanData;
+import com.azure.resourcemanager.newrelicobservability.models.SwitchBillingRequest;
+import com.azure.resourcemanager.newrelicobservability.models.UsageType;
+import java.time.OffsetDateTime;
+
+/** Samples for Monitors SwitchBilling. */
+public final class MonitorsSwitchBillingSamples {
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_SwitchBilling_MinimumSet_Gen.json
+ */
+ /**
+ * Sample code: Monitors_SwitchBilling_MinimumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void monitorsSwitchBillingMinimumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager
+ .monitors()
+ .switchBillingWithResponse(
+ "rgNewRelic",
+ "fhcjxnxumkdlgpwanewtkdnyuz",
+ new SwitchBillingRequest().withUserEmail("ruxvg@xqkmdhrnoo.hlmbpm"),
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_SwitchBilling_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: Monitors_SwitchBilling_MaximumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void monitorsSwitchBillingMaximumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager
+ .monitors()
+ .switchBillingWithResponse(
+ "rgNewRelic",
+ "fhcjxnxumkdlgpwanewtkdnyuz",
+ new SwitchBillingRequest()
+ .withAzureResourceId("enfghpfw")
+ .withOrganizationId("k")
+ .withPlanData(
+ new PlanData()
+ .withUsageType(UsageType.PAYG)
+ .withBillingCycle(BillingCycle.YEARLY)
+ .withPlanDetails("tbbiaga")
+ .withEffectiveDate(OffsetDateTime.parse("2022-12-05T14:11:37.786Z")))
+ .withUserEmail("ruxvg@xqkmdhrnoo.hlmbpm"),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Monitors_Update
+
+```java
+import com.azure.resourcemanager.newrelicobservability.models.AccountCreationSource;
+import com.azure.resourcemanager.newrelicobservability.models.AccountInfo;
+import com.azure.resourcemanager.newrelicobservability.models.BillingCycle;
+import com.azure.resourcemanager.newrelicobservability.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.newrelicobservability.models.ManagedServiceIdentityType;
+import com.azure.resourcemanager.newrelicobservability.models.NewRelicAccountProperties;
+import com.azure.resourcemanager.newrelicobservability.models.NewRelicMonitorResource;
+import com.azure.resourcemanager.newrelicobservability.models.NewRelicSingleSignOnProperties;
+import com.azure.resourcemanager.newrelicobservability.models.OrgCreationSource;
+import com.azure.resourcemanager.newrelicobservability.models.OrganizationInfo;
+import com.azure.resourcemanager.newrelicobservability.models.PlanData;
+import com.azure.resourcemanager.newrelicobservability.models.ProvisioningState;
+import com.azure.resourcemanager.newrelicobservability.models.SingleSignOnStates;
+import com.azure.resourcemanager.newrelicobservability.models.UsageType;
+import com.azure.resourcemanager.newrelicobservability.models.UserAssignedIdentity;
+import com.azure.resourcemanager.newrelicobservability.models.UserInfo;
+import java.time.OffsetDateTime;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Monitors Update. */
+public final class MonitorsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_Update_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: Monitors_Update_MaximumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void monitorsUpdateMaximumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ NewRelicMonitorResource resource =
+ manager
+ .monitors()
+ .getByResourceGroupWithResponse("rgNewRelic", "cdlymktqw", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(mapOf("key164", "jqakdrrmmyzytqu"))
+ .withIdentity(
+ new ManagedServiceIdentity()
+ .withType(ManagedServiceIdentityType.NONE)
+ .withUserAssignedIdentities(mapOf("key8903", new UserAssignedIdentity())))
+ .withNewRelicAccountProperties(
+ new NewRelicAccountProperties()
+ .withUserId("vcscxlncofcuduadesd")
+ .withAccountInfo(
+ new AccountInfo()
+ .withAccountId("xhqmg")
+ .withIngestionKey("fakeTokenPlaceholder")
+ .withRegion("ljcf"))
+ .withOrganizationInfo(new OrganizationInfo().withOrganizationId("k"))
+ .withSingleSignOnProperties(
+ new NewRelicSingleSignOnProperties()
+ .withSingleSignOnState(SingleSignOnStates.INITIAL)
+ .withEnterpriseAppId("kwiwfz")
+ .withSingleSignOnUrl("kvseueuljsxmfwpqctz")
+ .withProvisioningState(ProvisioningState.ACCEPTED)))
+ .withUserInfo(
+ new UserInfo()
+ .withFirstName("vdftzcggirefejajwahhwhyibutramdaotvnuf")
+ .withLastName("bcsztgqovdlmzfkjdrngidwzqsevagexzzilnlc")
+ .withEmailAddress("%6%@4-g.N1.3F-kI1.Ue-.lJso")
+ .withPhoneNumber("krf")
+ .withCountry("hslqnwdanrconqyekwbnttaetv"))
+ .withPlanData(
+ new PlanData()
+ .withUsageType(UsageType.PAYG)
+ .withBillingCycle(BillingCycle.YEARLY)
+ .withPlanDetails("tbbiaga")
+ .withEffectiveDate(OffsetDateTime.parse("2022-12-05T14:11:37.786Z")))
+ .withOrgCreationSource(OrgCreationSource.LIFTR)
+ .withAccountCreationSource(AccountCreationSource.LIFTR)
+ .apply();
+ }
+
+ @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;
+ }
+}
+```
+
+### Monitors_VmHostPayload
+
+```java
+/** Samples for Monitors VmHostPayload. */
+public final class MonitorsVmHostPayloadSamples {
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_VmHostPayload_MinimumSet_Gen.json
+ */
+ /**
+ * Sample code: Monitors_VmHostPayload_MinimumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void monitorsVmHostPayloadMinimumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager
+ .monitors()
+ .vmHostPayloadWithResponse("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Monitors_VmHostPayload_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: Monitors_VmHostPayload_MaximumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void monitorsVmHostPayloadMaximumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager
+ .monitors()
+ .vmHostPayloadWithResponse("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Operations_List
+
+```java
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Operations_List_MinimumSet_Gen.json
+ */
+ /**
+ * Sample code: Operations_List_MinimumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void operationsListMinimumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager.operations().list(com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Operations_List_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: Operations_List_MaximumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void operationsListMaximumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager.operations().list(com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Organizations_List
+
+```java
+/** Samples for Organizations List. */
+public final class OrganizationsListSamples {
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Organizations_List_MinimumSet_Gen.json
+ */
+ /**
+ * Sample code: Organizations_List_MinimumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void organizationsListMinimumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager.organizations().list("ruxvg@xqkmdhrnoo.hlmbpm", "egh", com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Organizations_List_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: Organizations_List_MaximumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void organizationsListMaximumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager.organizations().list("ruxvg@xqkmdhrnoo.hlmbpm", "egh", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Plans_List
+
+```java
+/** Samples for Plans List. */
+public final class PlansListSamples {
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Plans_List_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: Plans_List_MaximumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void plansListMaximumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager.plans().list("pwuxgvrmkk", "hilawwjz", com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/Plans_List_MinimumSet_Gen.json
+ */
+ /**
+ * Sample code: Plans_List_MinimumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void plansListMinimumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager.plans().list(null, null, com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### TagRules_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricRulesInner;
+import com.azure.resourcemanager.newrelicobservability.models.FilteringTag;
+import com.azure.resourcemanager.newrelicobservability.models.LogRules;
+import com.azure.resourcemanager.newrelicobservability.models.SendAadLogsStatus;
+import com.azure.resourcemanager.newrelicobservability.models.SendActivityLogsStatus;
+import com.azure.resourcemanager.newrelicobservability.models.SendSubscriptionLogsStatus;
+import com.azure.resourcemanager.newrelicobservability.models.TagAction;
+import java.util.Arrays;
+
+/** Samples for TagRules CreateOrUpdate. */
+public final class TagRulesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/TagRules_CreateOrUpdate_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: TagRules_CreateOrUpdate_MaximumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void tagRulesCreateOrUpdateMaximumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager
+ .tagRules()
+ .define("bxcantgzggsepbhqmedjqyrqeezmfb")
+ .withExistingMonitor("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron")
+ .withLogRules(
+ new LogRules()
+ .withSendAadLogs(SendAadLogsStatus.ENABLED)
+ .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED)
+ .withSendActivityLogs(SendActivityLogsStatus.ENABLED)
+ .withFilteringTags(
+ Arrays
+ .asList(
+ new FilteringTag()
+ .withName("saokgpjvdlorciqbjmjxazpee")
+ .withValue("sarxrqsxouhdjwsrqqicbeirdb")
+ .withAction(TagAction.INCLUDE))))
+ .withMetricRules(
+ new MetricRulesInner()
+ .withFilteringTags(
+ Arrays
+ .asList(
+ new FilteringTag()
+ .withName("saokgpjvdlorciqbjmjxazpee")
+ .withValue("sarxrqsxouhdjwsrqqicbeirdb")
+ .withAction(TagAction.INCLUDE)))
+ .withUserEmail("test@testing.com"))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/TagRules_CreateOrUpdate_MinimumSet_Gen.json
+ */
+ /**
+ * Sample code: TagRules_CreateOrUpdate_MinimumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void tagRulesCreateOrUpdateMinimumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager
+ .tagRules()
+ .define("bxcantgzggsepbhqmedjqyrqeezmfb")
+ .withExistingMonitor("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron")
+ .create();
+ }
+}
+```
+
+### TagRules_Delete
+
+```java
+/** Samples for TagRules Delete. */
+public final class TagRulesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/TagRules_Delete_MinimumSet_Gen.json
+ */
+ /**
+ * Sample code: TagRules_Delete_MinimumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void tagRulesDeleteMinimumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager
+ .tagRules()
+ .delete(
+ "rgopenapi",
+ "ipxmlcbonyxtolzejcjshkmlron",
+ "bxcantgzggsepbhqmedjqyrqeezmfb",
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/TagRules_Delete_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: TagRules_Delete_MaximumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void tagRulesDeleteMaximumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager
+ .tagRules()
+ .delete(
+ "rgopenapi",
+ "ipxmlcbonyxtolzejcjshkmlron",
+ "bxcantgzggsepbhqmedjqyrqeezmfb",
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### TagRules_Get
+
+```java
+/** Samples for TagRules Get. */
+public final class TagRulesGetSamples {
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/TagRules_Get_MinimumSet_Gen.json
+ */
+ /**
+ * Sample code: TagRules_Get_MinimumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void tagRulesGetMinimumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager
+ .tagRules()
+ .getWithResponse(
+ "rgopenapi",
+ "ipxmlcbonyxtolzejcjshkmlron",
+ "bxcantgzggsepbhqmedjqyrqeezmfb",
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/TagRules_Get_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: TagRules_Get_MaximumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void tagRulesGetMaximumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager
+ .tagRules()
+ .getWithResponse(
+ "rgopenapi",
+ "ipxmlcbonyxtolzejcjshkmlron",
+ "bxcantgzggsepbhqmedjqyrqeezmfb",
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### TagRules_ListByNewRelicMonitorResource
+
+```java
+/** Samples for TagRules ListByNewRelicMonitorResource. */
+public final class TagRulesListByNewRelicMonitorResourceSamples {
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/TagRules_ListByNewRelicMonitorResource_MinimumSet_Gen.json
+ */
+ /**
+ * Sample code: TagRules_ListByNewRelicMonitorResource_MinimumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void tagRulesListByNewRelicMonitorResourceMinimumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager
+ .tagRules()
+ .listByNewRelicMonitorResource(
+ "rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/TagRules_ListByNewRelicMonitorResource_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: TagRules_ListByNewRelicMonitorResource_MaximumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void tagRulesListByNewRelicMonitorResourceMaximumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ manager
+ .tagRules()
+ .listByNewRelicMonitorResource(
+ "rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### TagRules_Update
+
+```java
+import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricRulesInner;
+import com.azure.resourcemanager.newrelicobservability.models.FilteringTag;
+import com.azure.resourcemanager.newrelicobservability.models.LogRules;
+import com.azure.resourcemanager.newrelicobservability.models.SendAadLogsStatus;
+import com.azure.resourcemanager.newrelicobservability.models.SendActivityLogsStatus;
+import com.azure.resourcemanager.newrelicobservability.models.SendSubscriptionLogsStatus;
+import com.azure.resourcemanager.newrelicobservability.models.TagAction;
+import com.azure.resourcemanager.newrelicobservability.models.TagRule;
+import java.util.Arrays;
+
+/** Samples for TagRules Update. */
+public final class TagRulesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/TagRules_Update_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: TagRules_Update_MaximumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void tagRulesUpdateMaximumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ TagRule resource =
+ manager
+ .tagRules()
+ .getWithResponse(
+ "rgopenapi",
+ "ipxmlcbonyxtolzejcjshkmlron",
+ "bxcantgzggsepbhqmedjqyrqeezmfb",
+ com.azure.core.util.Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withLogRules(
+ new LogRules()
+ .withSendAadLogs(SendAadLogsStatus.ENABLED)
+ .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED)
+ .withSendActivityLogs(SendActivityLogsStatus.ENABLED)
+ .withFilteringTags(
+ Arrays
+ .asList(
+ new FilteringTag()
+ .withName("saokgpjvdlorciqbjmjxazpee")
+ .withValue("sarxrqsxouhdjwsrqqicbeirdb")
+ .withAction(TagAction.INCLUDE))))
+ .withMetricRules(
+ new MetricRulesInner()
+ .withFilteringTags(
+ Arrays
+ .asList(
+ new FilteringTag()
+ .withName("saokgpjvdlorciqbjmjxazpee")
+ .withValue("sarxrqsxouhdjwsrqqicbeirdb")
+ .withAction(TagAction.INCLUDE)))
+ .withUserEmail("test@testing.com"))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/preview/2022-07-01-preview/examples/TagRules_Update_MinimumSet_Gen.json
+ */
+ /**
+ * Sample code: TagRules_Update_MinimumSet_Gen.
+ *
+ * @param manager Entry point to NewRelicObservabilityManager.
+ */
+ public static void tagRulesUpdateMinimumSetGen(
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
+ TagRule resource =
+ manager
+ .tagRules()
+ .getWithResponse(
+ "rgopenapi",
+ "ipxmlcbonyxtolzejcjshkmlron",
+ "bxcantgzggsepbhqmedjqyrqeezmfb",
+ com.azure.core.util.Context.NONE)
+ .getValue();
+ resource.update().apply();
+ }
+}
+```
+
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/pom.xml b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/pom.xml
new file mode 100644
index 0000000000000..5aec76f2df369
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/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-newrelicobservability
+ 1.0.0-beta.1
+ jar
+
+ Microsoft Azure SDK for NewRelicObservability Management
+ This package contains Microsoft Azure SDK for NewRelicObservability Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2022-07-01-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
+ 0
+ 0
+
+
+
+ com.azure
+ azure-core
+ 1.37.0
+
+
+ com.azure
+ azure-core-management
+ 1.10.2
+
+
+ com.azure
+ azure-core-test
+ 1.15.0
+ test
+
+
+ com.azure
+ azure-identity
+ 1.8.1
+ test
+
+
+ org.junit.jupiter
+ junit-jupiter-api
+ 5.9.1
+ test
+
+
+ org.junit.jupiter
+ junit-jupiter-engine
+ 5.9.1
+ test
+
+
+ org.mockito
+ mockito-core
+ 4.5.1
+ test
+
+
+ org.slf4j
+ slf4j-simple
+ 1.7.36
+ test
+
+
+
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/NewRelicObservabilityManager.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/NewRelicObservabilityManager.java
new file mode 100644
index 0000000000000..c9d6e1fa454e4
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/NewRelicObservabilityManager.java
@@ -0,0 +1,363 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.newrelicobservability;
+
+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.newrelicobservability.fluent.NewRelicObservability;
+import com.azure.resourcemanager.newrelicobservability.implementation.AccountsImpl;
+import com.azure.resourcemanager.newrelicobservability.implementation.MonitorsImpl;
+import com.azure.resourcemanager.newrelicobservability.implementation.NewRelicObservabilityBuilder;
+import com.azure.resourcemanager.newrelicobservability.implementation.OperationsImpl;
+import com.azure.resourcemanager.newrelicobservability.implementation.OrganizationsImpl;
+import com.azure.resourcemanager.newrelicobservability.implementation.PlansImpl;
+import com.azure.resourcemanager.newrelicobservability.implementation.TagRulesImpl;
+import com.azure.resourcemanager.newrelicobservability.models.Accounts;
+import com.azure.resourcemanager.newrelicobservability.models.Monitors;
+import com.azure.resourcemanager.newrelicobservability.models.Operations;
+import com.azure.resourcemanager.newrelicobservability.models.Organizations;
+import com.azure.resourcemanager.newrelicobservability.models.Plans;
+import com.azure.resourcemanager.newrelicobservability.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 NewRelicObservabilityManager. */
+public final class NewRelicObservabilityManager {
+ private Operations operations;
+
+ private Accounts accounts;
+
+ private Monitors monitors;
+
+ private Organizations organizations;
+
+ private Plans plans;
+
+ private TagRules tagRules;
+
+ private final NewRelicObservability clientObject;
+
+ private NewRelicObservabilityManager(
+ HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ this.clientObject =
+ new NewRelicObservabilityBuilder()
+ .pipeline(httpPipeline)
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
+ }
+
+ /**
+ * Creates an instance of NewRelicObservability service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the NewRelicObservability service API instance.
+ */
+ public static NewRelicObservabilityManager 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 NewRelicObservability service API entry point.
+ *
+ * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
+ * @param profile the Azure profile for client.
+ * @return the NewRelicObservability service API instance.
+ */
+ public static NewRelicObservabilityManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return new NewRelicObservabilityManager(httpPipeline, profile, null);
+ }
+
+ /**
+ * Gets a Configurable instance that can be used to create NewRelicObservabilityManager with optional configuration.
+ *
+ * @return the Configurable instance allowing configurations.
+ */
+ public static Configurable configure() {
+ return new NewRelicObservabilityManager.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 NewRelicObservability service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the NewRelicObservability service API instance.
+ */
+ public NewRelicObservabilityManager 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.newrelicobservability")
+ .append("/")
+ .append("1.0.0-beta.1");
+ 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 NewRelicObservabilityManager(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 Accounts.
+ *
+ * @return Resource collection API of Accounts.
+ */
+ public Accounts accounts() {
+ if (this.accounts == null) {
+ this.accounts = new AccountsImpl(clientObject.getAccounts(), this);
+ }
+ return accounts;
+ }
+
+ /**
+ * Gets the resource collection API of Monitors. It manages NewRelicMonitorResource.
+ *
+ * @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 Organizations.
+ *
+ * @return Resource collection API of Organizations.
+ */
+ public Organizations organizations() {
+ if (this.organizations == null) {
+ this.organizations = new OrganizationsImpl(clientObject.getOrganizations(), this);
+ }
+ return organizations;
+ }
+
+ /**
+ * Gets the resource collection API of Plans.
+ *
+ * @return Resource collection API of Plans.
+ */
+ public Plans plans() {
+ if (this.plans == null) {
+ this.plans = new PlansImpl(clientObject.getPlans(), this);
+ }
+ return plans;
+ }
+
+ /**
+ * Gets the resource collection API of TagRules. It manages TagRule.
+ *
+ * @return Resource collection API of TagRules.
+ */
+ public TagRules tagRules() {
+ if (this.tagRules == null) {
+ this.tagRules = new TagRulesImpl(clientObject.getTagRules(), this);
+ }
+ return tagRules;
+ }
+
+ /**
+ * @return Wrapped service client NewRelicObservability providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ */
+ public NewRelicObservability serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/AccountsClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/AccountsClient.java
new file mode 100644
index 0000000000000..bebbcf51a9f01
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/AccountsClient.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.newrelicobservability.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.newrelicobservability.fluent.models.AccountResourceInner;
+
+/** An instance of this class provides access to all the operations defined in AccountsClient. */
+public interface AccountsClient {
+ /**
+ * List all the existing accounts.
+ *
+ * @param userEmail User Email.
+ * @param location Location for NewRelic.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException 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 get all accounts Operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String userEmail, String location);
+
+ /**
+ * List all the existing accounts.
+ *
+ * @param userEmail User Email.
+ * @param location Location for NewRelic.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException 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 get all accounts Operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String userEmail, String location, Context context);
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/MonitorsClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/MonitorsClient.java
new file mode 100644
index 0000000000000..2a5d1782353f2
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/MonitorsClient.java
@@ -0,0 +1,467 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.newrelicobservability.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.newrelicobservability.fluent.models.AppServiceInfoInner;
+import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricRulesInner;
+import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricsStatusResponseInner;
+import com.azure.resourcemanager.newrelicobservability.fluent.models.MonitoredResourceInner;
+import com.azure.resourcemanager.newrelicobservability.fluent.models.NewRelicMonitorResourceInner;
+import com.azure.resourcemanager.newrelicobservability.fluent.models.VMExtensionPayloadInner;
+import com.azure.resourcemanager.newrelicobservability.fluent.models.VMInfoInner;
+import com.azure.resourcemanager.newrelicobservability.models.AppServicesGetRequest;
+import com.azure.resourcemanager.newrelicobservability.models.HostsGetRequest;
+import com.azure.resourcemanager.newrelicobservability.models.MetricsRequest;
+import com.azure.resourcemanager.newrelicobservability.models.MetricsStatusRequest;
+import com.azure.resourcemanager.newrelicobservability.models.NewRelicMonitorResourceUpdate;
+import com.azure.resourcemanager.newrelicobservability.models.SwitchBillingRequest;
+
+/** An instance of this class provides access to all the operations defined in MonitorsClient. */
+public interface MonitorsClient {
+ /**
+ * List NewRelicMonitorResource resources by subscription ID.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown 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 NewRelicMonitorResource list operation as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List NewRelicMonitorResource resources by subscription 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 of a NewRelicMonitorResource list operation as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * List NewRelicMonitorResource resources 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 NewRelicMonitorResource list operation as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * List NewRelicMonitorResource resources 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 NewRelicMonitorResource list operation as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Get a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 NewRelicMonitorResource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String monitorName, Context context);
+
+ /**
+ * Get a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 NewRelicMonitorResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NewRelicMonitorResourceInner getByResourceGroup(String resourceGroupName, String monitorName);
+
+ /**
+ * Create a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 a Monitor Resource by NewRelic.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, NewRelicMonitorResourceInner> beginCreateOrUpdate(
+ String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource);
+
+ /**
+ * Create a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 a Monitor Resource by NewRelic.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, NewRelicMonitorResourceInner> beginCreateOrUpdate(
+ String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource, Context context);
+
+ /**
+ * Create a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 a Monitor Resource by NewRelic.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NewRelicMonitorResourceInner createOrUpdate(
+ String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource);
+
+ /**
+ * Create a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 a Monitor Resource by NewRelic.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NewRelicMonitorResourceInner createOrUpdate(
+ String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource, Context context);
+
+ /**
+ * Update a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @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 Monitor Resource by NewRelic along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName, String monitorName, NewRelicMonitorResourceUpdate properties, Context context);
+
+ /**
+ * Update a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @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 Monitor Resource by NewRelic.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NewRelicMonitorResourceInner update(
+ String resourceGroupName, String monitorName, NewRelicMonitorResourceUpdate properties);
+
+ /**
+ * Delete a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param userEmail User Email.
+ * @param monitorName Name of the Monitors 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 userEmail, String monitorName);
+
+ /**
+ * Delete a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param userEmail User Email.
+ * @param monitorName Name of the Monitors 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 userEmail, String monitorName, Context context);
+
+ /**
+ * Delete a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param userEmail User Email.
+ * @param monitorName Name of the Monitors 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 userEmail, String monitorName);
+
+ /**
+ * Delete a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param userEmail User Email.
+ * @param monitorName Name of the Monitors 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 userEmail, String monitorName, Context context);
+
+ /**
+ * Get metric rules.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the get metrics status 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 metric rules along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getMetricRulesWithResponse(
+ String resourceGroupName, String monitorName, MetricsRequest request, Context context);
+
+ /**
+ * Get metric rules.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the get metrics status 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 metric rules.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MetricRulesInner getMetricRules(String resourceGroupName, String monitorName, MetricsRequest request);
+
+ /**
+ * Get metric status.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the get metrics status 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 metric status along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getMetricStatusWithResponse(
+ String resourceGroupName, String monitorName, MetricsStatusRequest request, Context context);
+
+ /**
+ * Get metric status.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the get metrics status 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 metric status.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MetricsStatusResponseInner getMetricStatus(
+ String resourceGroupName, String monitorName, MetricsStatusRequest request);
+
+ /**
+ * List the app service resources currently being monitored by the NewRelic resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the app services get 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 response of a list app services Operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listAppServices(
+ String resourceGroupName, String monitorName, AppServicesGetRequest request);
+
+ /**
+ * List the app service resources currently being monitored by the NewRelic resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the app services get 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 response of a list app services Operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listAppServices(
+ String resourceGroupName, String monitorName, AppServicesGetRequest request, Context context);
+
+ /**
+ * Switches the billing for NewRelic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the switch billing 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 switchBillingWithResponse(
+ String resourceGroupName, String monitorName, SwitchBillingRequest request, Context context);
+
+ /**
+ * Switches the billing for NewRelic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the switch billing 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 switchBilling(String resourceGroupName, String monitorName, SwitchBillingRequest request);
+
+ /**
+ * List the compute vm resources currently being monitored by the NewRelic resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the Hosts get 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 response of a list VM Host Operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listHosts(String resourceGroupName, String monitorName, HostsGetRequest request);
+
+ /**
+ * List the compute vm resources currently being monitored by the NewRelic resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the Hosts get 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 response of a list VM Host Operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listHosts(
+ String resourceGroupName, String monitorName, HostsGetRequest request, Context context);
+
+ /**
+ * List the resources currently being monitored by the NewRelic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 list of all the resources being monitored by NewRelic monitor resource as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMonitoredResources(String resourceGroupName, String monitorName);
+
+ /**
+ * List the resources currently being monitored by the NewRelic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 list of all the resources being monitored by NewRelic monitor resource as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMonitoredResources(
+ String resourceGroupName, String monitorName, Context context);
+
+ /**
+ * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 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 NewRelic agent on a VM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 response of payload to be passed while installing VM agent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VMExtensionPayloadInner vmHostPayload(String resourceGroupName, String monitorName);
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/NewRelicObservability.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/NewRelicObservability.java
new file mode 100644
index 0000000000000..5057a6922bb54
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/NewRelicObservability.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.newrelicobservability.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for NewRelicObservability class. */
+public interface NewRelicObservability {
+ /**
+ * 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 AccountsClient object to access its operations.
+ *
+ * @return the AccountsClient object.
+ */
+ AccountsClient getAccounts();
+
+ /**
+ * Gets the MonitorsClient object to access its operations.
+ *
+ * @return the MonitorsClient object.
+ */
+ MonitorsClient getMonitors();
+
+ /**
+ * Gets the OrganizationsClient object to access its operations.
+ *
+ * @return the OrganizationsClient object.
+ */
+ OrganizationsClient getOrganizations();
+
+ /**
+ * Gets the PlansClient object to access its operations.
+ *
+ * @return the PlansClient object.
+ */
+ PlansClient getPlans();
+
+ /**
+ * Gets the TagRulesClient object to access its operations.
+ *
+ * @return the TagRulesClient object.
+ */
+ TagRulesClient getTagRules();
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/OperationsClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/OperationsClient.java
new file mode 100644
index 0000000000000..030cebabc15ae
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/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.newrelicobservability.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.newrelicobservability.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/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/OrganizationsClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/OrganizationsClient.java
new file mode 100644
index 0000000000000..022c25a18cfe6
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/OrganizationsClient.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.newrelicobservability.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.newrelicobservability.fluent.models.OrganizationResourceInner;
+
+/** An instance of this class provides access to all the operations defined in OrganizationsClient. */
+public interface OrganizationsClient {
+ /**
+ * List all the existing organizations.
+ *
+ * @param userEmail User Email.
+ * @param location Location for NewRelic.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException 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 get all organizations Operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String userEmail, String location);
+
+ /**
+ * List all the existing organizations.
+ *
+ * @param userEmail User Email.
+ * @param location Location for NewRelic.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException 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 get all organizations Operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String userEmail, String location, Context context);
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/PlansClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/PlansClient.java
new file mode 100644
index 0000000000000..5fdc8edde21f2
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/PlansClient.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.newrelicobservability.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.newrelicobservability.fluent.models.PlanDataResourceInner;
+
+/** An instance of this class provides access to all the operations defined in PlansClient. */
+public interface PlansClient {
+ /**
+ * List plans data.
+ *
+ * @throws com.azure.core.management.exception.ManagementException 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 get all plan data Operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List plans data.
+ *
+ * @param accountId Account Id.
+ * @param organizationId Organization 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 response of get all plan data Operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String accountId, String organizationId, Context context);
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/TagRulesClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/TagRulesClient.java
new file mode 100644
index 0000000000000..b7d971519c4e7
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/TagRulesClient.java
@@ -0,0 +1,236 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.newrelicobservability.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.newrelicobservability.fluent.models.TagRuleInner;
+import com.azure.resourcemanager.newrelicobservability.fluent.models.TagRuleUpdateInner;
+
+/** An instance of this class provides access to all the operations defined in TagRulesClient. */
+public interface TagRulesClient {
+ /**
+ * List TagRule resources by NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 response of a TagRule list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByNewRelicMonitorResource(String resourceGroupName, String monitorName);
+
+ /**
+ * List TagRule resources by NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 response of a TagRule list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByNewRelicMonitorResource(
+ String resourceGroupName, String monitorName, Context context);
+
+ /**
+ * Get a TagRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param ruleSetName Name of the TagRule.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a TagRule along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String monitorName, String ruleSetName, Context context);
+
+ /**
+ * Get a TagRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param ruleSetName Name of the TagRule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a TagRule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TagRuleInner get(String resourceGroupName, String monitorName, String ruleSetName);
+
+ /**
+ * Create a TagRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param ruleSetName Name of the TagRule.
+ * @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 tag rule belonging to NewRelic account.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, TagRuleInner> beginCreateOrUpdate(
+ String resourceGroupName, String monitorName, String ruleSetName, TagRuleInner resource);
+
+ /**
+ * Create a TagRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param ruleSetName Name of the TagRule.
+ * @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 tag rule belonging to NewRelic account.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, TagRuleInner> beginCreateOrUpdate(
+ String resourceGroupName, String monitorName, String ruleSetName, TagRuleInner resource, Context context);
+
+ /**
+ * Create a TagRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param ruleSetName Name of the TagRule.
+ * @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 tag rule belonging to NewRelic account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TagRuleInner createOrUpdate(
+ String resourceGroupName, String monitorName, String ruleSetName, TagRuleInner resource);
+
+ /**
+ * Create a TagRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param ruleSetName Name of the TagRule.
+ * @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 tag rule belonging to NewRelic account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TagRuleInner createOrUpdate(
+ String resourceGroupName, String monitorName, String ruleSetName, TagRuleInner resource, Context context);
+
+ /**
+ * Delete a TagRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param ruleSetName Name of the TagRule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @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 ruleSetName);
+
+ /**
+ * Delete a TagRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param ruleSetName Name of the TagRule.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @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 ruleSetName, Context context);
+
+ /**
+ * Delete a TagRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param ruleSetName Name of the TagRule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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);
+
+ /**
+ * Delete a TagRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param ruleSetName Name of the TagRule.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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, Context context);
+
+ /**
+ * Update a TagRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param ruleSetName Name of the TagRule.
+ * @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 tag rule belonging to NewRelic account along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName,
+ String monitorName,
+ String ruleSetName,
+ TagRuleUpdateInner properties,
+ Context context);
+
+ /**
+ * Update a TagRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param ruleSetName Name of the TagRule.
+ * @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 tag rule belonging to NewRelic account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TagRuleInner update(
+ String resourceGroupName, String monitorName, String ruleSetName, TagRuleUpdateInner properties);
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/AccountProperties.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/AccountProperties.java
new file mode 100644
index 0000000000000..fe7862b7a39e4
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/AccountProperties.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.newrelicobservability.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** List of all the New relic accounts for the given user. */
+@Fluent
+public final class AccountProperties {
+ /*
+ * organization id
+ */
+ @JsonProperty(value = "organizationId")
+ private String organizationId;
+
+ /*
+ * account id
+ */
+ @JsonProperty(value = "accountId")
+ private String accountId;
+
+ /*
+ * account name
+ */
+ @JsonProperty(value = "accountName")
+ private String accountName;
+
+ /*
+ * region
+ */
+ @JsonProperty(value = "region")
+ private String region;
+
+ /** Creates an instance of AccountProperties class. */
+ public AccountProperties() {
+ }
+
+ /**
+ * Get the organizationId property: organization id.
+ *
+ * @return the organizationId value.
+ */
+ public String organizationId() {
+ return this.organizationId;
+ }
+
+ /**
+ * Set the organizationId property: organization id.
+ *
+ * @param organizationId the organizationId value to set.
+ * @return the AccountProperties object itself.
+ */
+ public AccountProperties withOrganizationId(String organizationId) {
+ this.organizationId = organizationId;
+ return this;
+ }
+
+ /**
+ * Get the accountId property: account id.
+ *
+ * @return the accountId value.
+ */
+ public String accountId() {
+ return this.accountId;
+ }
+
+ /**
+ * Set the accountId property: account id.
+ *
+ * @param accountId the accountId value to set.
+ * @return the AccountProperties object itself.
+ */
+ public AccountProperties withAccountId(String accountId) {
+ this.accountId = accountId;
+ return this;
+ }
+
+ /**
+ * Get the accountName property: account name.
+ *
+ * @return the accountName value.
+ */
+ public String accountName() {
+ return this.accountName;
+ }
+
+ /**
+ * Set the accountName property: account name.
+ *
+ * @param accountName the accountName value to set.
+ * @return the AccountProperties object itself.
+ */
+ public AccountProperties withAccountName(String accountName) {
+ this.accountName = accountName;
+ return this;
+ }
+
+ /**
+ * Get the region property: region.
+ *
+ * @return the region value.
+ */
+ public String region() {
+ return this.region;
+ }
+
+ /**
+ * Set the region property: region.
+ *
+ * @param region the region value to set.
+ * @return the AccountProperties object itself.
+ */
+ public AccountProperties withRegion(String region) {
+ this.region = region;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/AccountResourceInner.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/AccountResourceInner.java
new file mode 100644
index 0000000000000..1ed1f744a4001
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/AccountResourceInner.java
@@ -0,0 +1,151 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.newrelicobservability.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The details of a account resource. */
+@Fluent
+public final class AccountResourceInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ @JsonProperty(value = "properties")
+ private AccountProperties innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /** Creates an instance of AccountResourceInner class. */
+ public AccountResourceInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The resource-specific properties for this resource.
+ *
+ * @return the innerProperties value.
+ */
+ private AccountProperties 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 organizationId property: organization id.
+ *
+ * @return the organizationId value.
+ */
+ public String organizationId() {
+ return this.innerProperties() == null ? null : this.innerProperties().organizationId();
+ }
+
+ /**
+ * Set the organizationId property: organization id.
+ *
+ * @param organizationId the organizationId value to set.
+ * @return the AccountResourceInner object itself.
+ */
+ public AccountResourceInner withOrganizationId(String organizationId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AccountProperties();
+ }
+ this.innerProperties().withOrganizationId(organizationId);
+ return this;
+ }
+
+ /**
+ * Get the accountId property: account id.
+ *
+ * @return the accountId value.
+ */
+ public String accountId() {
+ return this.innerProperties() == null ? null : this.innerProperties().accountId();
+ }
+
+ /**
+ * Set the accountId property: account id.
+ *
+ * @param accountId the accountId value to set.
+ * @return the AccountResourceInner object itself.
+ */
+ public AccountResourceInner withAccountId(String accountId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AccountProperties();
+ }
+ this.innerProperties().withAccountId(accountId);
+ return this;
+ }
+
+ /**
+ * Get the accountName property: account name.
+ *
+ * @return the accountName value.
+ */
+ public String accountName() {
+ return this.innerProperties() == null ? null : this.innerProperties().accountName();
+ }
+
+ /**
+ * Set the accountName property: account name.
+ *
+ * @param accountName the accountName value to set.
+ * @return the AccountResourceInner object itself.
+ */
+ public AccountResourceInner withAccountName(String accountName) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AccountProperties();
+ }
+ this.innerProperties().withAccountName(accountName);
+ return this;
+ }
+
+ /**
+ * Get the region property: region.
+ *
+ * @return the region value.
+ */
+ public String region() {
+ return this.innerProperties() == null ? null : this.innerProperties().region();
+ }
+
+ /**
+ * Set the region property: region.
+ *
+ * @param region the region value to set.
+ * @return the AccountResourceInner object itself.
+ */
+ public AccountResourceInner withRegion(String region) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AccountProperties();
+ }
+ this.innerProperties().withRegion(region);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/AppServiceInfoInner.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/AppServiceInfoInner.java
new file mode 100644
index 0000000000000..a06da081e1979
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/AppServiceInfoInner.java
@@ -0,0 +1,102 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.newrelicobservability.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Details of VM Resource having NewRelic OneAgent installed. */
+@Fluent
+public final class AppServiceInfoInner {
+ /*
+ * Azure App service resource ID
+ */
+ @JsonProperty(value = "azureResourceId")
+ private String azureResourceId;
+
+ /*
+ * Version of the NewRelic agent installed on the App service.
+ */
+ @JsonProperty(value = "agentVersion")
+ private String agentVersion;
+
+ /*
+ * Status of the NewRelic agent installed on the App service.
+ */
+ @JsonProperty(value = "agentStatus")
+ private String agentStatus;
+
+ /** Creates an instance of AppServiceInfoInner class. */
+ public AppServiceInfoInner() {
+ }
+
+ /**
+ * Get the azureResourceId property: Azure App service resource ID.
+ *
+ * @return the azureResourceId value.
+ */
+ public String azureResourceId() {
+ return this.azureResourceId;
+ }
+
+ /**
+ * Set the azureResourceId property: Azure App service resource ID.
+ *
+ * @param azureResourceId the azureResourceId value to set.
+ * @return the AppServiceInfoInner object itself.
+ */
+ public AppServiceInfoInner withAzureResourceId(String azureResourceId) {
+ this.azureResourceId = azureResourceId;
+ return this;
+ }
+
+ /**
+ * Get the agentVersion property: Version of the NewRelic agent installed on the App service.
+ *
+ * @return the agentVersion value.
+ */
+ public String agentVersion() {
+ return this.agentVersion;
+ }
+
+ /**
+ * Set the agentVersion property: Version of the NewRelic agent installed on the App service.
+ *
+ * @param agentVersion the agentVersion value to set.
+ * @return the AppServiceInfoInner object itself.
+ */
+ public AppServiceInfoInner withAgentVersion(String agentVersion) {
+ this.agentVersion = agentVersion;
+ return this;
+ }
+
+ /**
+ * Get the agentStatus property: Status of the NewRelic agent installed on the App service.
+ *
+ * @return the agentStatus value.
+ */
+ public String agentStatus() {
+ return this.agentStatus;
+ }
+
+ /**
+ * Set the agentStatus property: Status of the NewRelic agent installed on the App service.
+ *
+ * @param agentStatus the agentStatus value to set.
+ * @return the AppServiceInfoInner object itself.
+ */
+ public AppServiceInfoInner withAgentStatus(String agentStatus) {
+ this.agentStatus = agentStatus;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MetricRulesInner.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MetricRulesInner.java
new file mode 100644
index 0000000000000..48c67894582cf
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MetricRulesInner.java
@@ -0,0 +1,108 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.newrelicobservability.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.newrelicobservability.models.FilteringTag;
+import com.azure.resourcemanager.newrelicobservability.models.SendMetricsStatus;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Set of rules for sending metrics for the Monitor resource. */
+@Fluent
+public final class MetricRulesInner {
+ /*
+ * Flag specifying if metrics should be sent for the Monitor resource.
+ */
+ @JsonProperty(value = "sendMetrics")
+ private SendMetricsStatus sendMetrics;
+
+ /*
+ * List of filtering tags to be used for capturing metrics.
+ */
+ @JsonProperty(value = "filteringTags")
+ private List filteringTags;
+
+ /*
+ * User Email
+ */
+ @JsonProperty(value = "userEmail")
+ private String userEmail;
+
+ /** Creates an instance of MetricRulesInner class. */
+ public MetricRulesInner() {
+ }
+
+ /**
+ * Get the sendMetrics property: Flag specifying if metrics should be sent for the Monitor resource.
+ *
+ * @return the sendMetrics value.
+ */
+ public SendMetricsStatus sendMetrics() {
+ return this.sendMetrics;
+ }
+
+ /**
+ * Set the sendMetrics property: Flag specifying if metrics should be sent for the Monitor resource.
+ *
+ * @param sendMetrics the sendMetrics value to set.
+ * @return the MetricRulesInner object itself.
+ */
+ public MetricRulesInner withSendMetrics(SendMetricsStatus sendMetrics) {
+ this.sendMetrics = sendMetrics;
+ return this;
+ }
+
+ /**
+ * Get the filteringTags property: List of filtering tags to be used for capturing metrics.
+ *
+ * @return the filteringTags value.
+ */
+ public List filteringTags() {
+ return this.filteringTags;
+ }
+
+ /**
+ * Set the filteringTags property: List of filtering tags to be used for capturing metrics.
+ *
+ * @param filteringTags the filteringTags value to set.
+ * @return the MetricRulesInner object itself.
+ */
+ public MetricRulesInner withFilteringTags(List filteringTags) {
+ this.filteringTags = filteringTags;
+ return this;
+ }
+
+ /**
+ * Get the userEmail property: User Email.
+ *
+ * @return the userEmail value.
+ */
+ public String userEmail() {
+ return this.userEmail;
+ }
+
+ /**
+ * Set the userEmail property: User Email.
+ *
+ * @param userEmail the userEmail value to set.
+ * @return the MetricRulesInner object itself.
+ */
+ public MetricRulesInner withUserEmail(String userEmail) {
+ this.userEmail = userEmail;
+ 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());
+ }
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MetricsStatusResponseInner.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MetricsStatusResponseInner.java
new file mode 100644
index 0000000000000..56ae936dc2f12
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MetricsStatusResponseInner.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.newrelicobservability.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Response of get metrics status Operation. */
+@Fluent
+public final class MetricsStatusResponseInner {
+ /*
+ * Azure resource IDs
+ */
+ @JsonProperty(value = "azureResourceIds")
+ private List azureResourceIds;
+
+ /** Creates an instance of MetricsStatusResponseInner class. */
+ public MetricsStatusResponseInner() {
+ }
+
+ /**
+ * Get the azureResourceIds property: Azure resource IDs.
+ *
+ * @return the azureResourceIds value.
+ */
+ public List azureResourceIds() {
+ return this.azureResourceIds;
+ }
+
+ /**
+ * Set the azureResourceIds property: Azure resource IDs.
+ *
+ * @param azureResourceIds the azureResourceIds value to set.
+ * @return the MetricsStatusResponseInner object itself.
+ */
+ public MetricsStatusResponseInner withAzureResourceIds(List azureResourceIds) {
+ this.azureResourceIds = azureResourceIds;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MonitorProperties.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MonitorProperties.java
new file mode 100644
index 0000000000000..cfad9ad1adfe3
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MonitorProperties.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.resourcemanager.newrelicobservability.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.newrelicobservability.models.AccountCreationSource;
+import com.azure.resourcemanager.newrelicobservability.models.LiftrResourceCategories;
+import com.azure.resourcemanager.newrelicobservability.models.MarketplaceSubscriptionStatus;
+import com.azure.resourcemanager.newrelicobservability.models.MonitoringStatus;
+import com.azure.resourcemanager.newrelicobservability.models.NewRelicAccountProperties;
+import com.azure.resourcemanager.newrelicobservability.models.OrgCreationSource;
+import com.azure.resourcemanager.newrelicobservability.models.PlanData;
+import com.azure.resourcemanager.newrelicobservability.models.ProvisioningState;
+import com.azure.resourcemanager.newrelicobservability.models.UserInfo;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Properties specific to the NewRelic Monitor resource. */
+@Fluent
+public final class MonitorProperties {
+ /*
+ * Provisioning State of the resource
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /*
+ * MonitoringStatus of the resource
+ */
+ @JsonProperty(value = "monitoringStatus", access = JsonProperty.Access.WRITE_ONLY)
+ private MonitoringStatus monitoringStatus;
+
+ /*
+ * NewRelic Organization properties of the resource
+ */
+ @JsonProperty(value = "marketplaceSubscriptionStatus", access = JsonProperty.Access.WRITE_ONLY)
+ private MarketplaceSubscriptionStatus marketplaceSubscriptionStatus;
+
+ /*
+ * Marketplace Subscription Id
+ */
+ @JsonProperty(value = "marketplaceSubscriptionId", access = JsonProperty.Access.WRITE_ONLY)
+ private String marketplaceSubscriptionId;
+
+ /*
+ * MarketplaceSubscriptionStatus of the resource
+ */
+ @JsonProperty(value = "newRelicAccountProperties")
+ private NewRelicAccountProperties newRelicAccountProperties;
+
+ /*
+ * User Info
+ */
+ @JsonProperty(value = "userInfo")
+ private UserInfo userInfo;
+
+ /*
+ * Plan details
+ */
+ @JsonProperty(value = "planData")
+ private PlanData planData;
+
+ /*
+ * Liftr resource category
+ */
+ @JsonProperty(value = "liftrResourceCategory", access = JsonProperty.Access.WRITE_ONLY)
+ private LiftrResourceCategories liftrResourceCategory;
+
+ /*
+ * Liftr resource preference. The priority of the resource.
+ */
+ @JsonProperty(value = "liftrResourcePreference", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer liftrResourcePreference;
+
+ /*
+ * Source of org creation
+ */
+ @JsonProperty(value = "orgCreationSource")
+ private OrgCreationSource orgCreationSource;
+
+ /*
+ * Source of account creation
+ */
+ @JsonProperty(value = "accountCreationSource")
+ private AccountCreationSource accountCreationSource;
+
+ /** Creates an instance of MonitorProperties class. */
+ public MonitorProperties() {
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning State of the resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the monitoringStatus property: MonitoringStatus of the resource.
+ *
+ * @return the monitoringStatus value.
+ */
+ public MonitoringStatus monitoringStatus() {
+ return this.monitoringStatus;
+ }
+
+ /**
+ * Get the marketplaceSubscriptionStatus property: NewRelic Organization properties of the resource.
+ *
+ * @return the marketplaceSubscriptionStatus value.
+ */
+ public MarketplaceSubscriptionStatus marketplaceSubscriptionStatus() {
+ return this.marketplaceSubscriptionStatus;
+ }
+
+ /**
+ * Get the marketplaceSubscriptionId property: Marketplace Subscription Id.
+ *
+ * @return the marketplaceSubscriptionId value.
+ */
+ public String marketplaceSubscriptionId() {
+ return this.marketplaceSubscriptionId;
+ }
+
+ /**
+ * Get the newRelicAccountProperties property: MarketplaceSubscriptionStatus of the resource.
+ *
+ * @return the newRelicAccountProperties value.
+ */
+ public NewRelicAccountProperties newRelicAccountProperties() {
+ return this.newRelicAccountProperties;
+ }
+
+ /**
+ * Set the newRelicAccountProperties property: MarketplaceSubscriptionStatus of the resource.
+ *
+ * @param newRelicAccountProperties the newRelicAccountProperties value to set.
+ * @return the MonitorProperties object itself.
+ */
+ public MonitorProperties withNewRelicAccountProperties(NewRelicAccountProperties newRelicAccountProperties) {
+ this.newRelicAccountProperties = newRelicAccountProperties;
+ return this;
+ }
+
+ /**
+ * Get the userInfo property: User Info.
+ *
+ * @return the userInfo value.
+ */
+ public UserInfo userInfo() {
+ return this.userInfo;
+ }
+
+ /**
+ * Set the userInfo property: User Info.
+ *
+ * @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: Plan details.
+ *
+ * @return the planData value.
+ */
+ public PlanData planData() {
+ return this.planData;
+ }
+
+ /**
+ * Set the planData property: Plan details.
+ *
+ * @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: Liftr resource category.
+ *
+ * @return the liftrResourceCategory value.
+ */
+ public LiftrResourceCategories liftrResourceCategory() {
+ return this.liftrResourceCategory;
+ }
+
+ /**
+ * Get the liftrResourcePreference property: Liftr resource preference. The priority of the resource.
+ *
+ * @return the liftrResourcePreference value.
+ */
+ public Integer liftrResourcePreference() {
+ return this.liftrResourcePreference;
+ }
+
+ /**
+ * Get the orgCreationSource property: Source of org creation.
+ *
+ * @return the orgCreationSource value.
+ */
+ public OrgCreationSource orgCreationSource() {
+ return this.orgCreationSource;
+ }
+
+ /**
+ * Set the orgCreationSource property: Source of org creation.
+ *
+ * @param orgCreationSource the orgCreationSource value to set.
+ * @return the MonitorProperties object itself.
+ */
+ public MonitorProperties withOrgCreationSource(OrgCreationSource orgCreationSource) {
+ this.orgCreationSource = orgCreationSource;
+ return this;
+ }
+
+ /**
+ * Get the accountCreationSource property: Source of account creation.
+ *
+ * @return the accountCreationSource value.
+ */
+ public AccountCreationSource accountCreationSource() {
+ return this.accountCreationSource;
+ }
+
+ /**
+ * Set the accountCreationSource property: Source of account creation.
+ *
+ * @param accountCreationSource the accountCreationSource value to set.
+ * @return the MonitorProperties object itself.
+ */
+ public MonitorProperties withAccountCreationSource(AccountCreationSource accountCreationSource) {
+ this.accountCreationSource = accountCreationSource;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (newRelicAccountProperties() != null) {
+ newRelicAccountProperties().validate();
+ }
+ if (userInfo() != null) {
+ userInfo().validate();
+ }
+ if (planData() != null) {
+ planData().validate();
+ }
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MonitoredResourceInner.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MonitoredResourceInner.java
new file mode 100644
index 0000000000000..294cfd43a25ed
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MonitoredResourceInner.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.newrelicobservability.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.newrelicobservability.models.SendingLogsStatus;
+import com.azure.resourcemanager.newrelicobservability.models.SendingMetricsStatus;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Details of resource being monitored by NewRelic monitor resource. */
+@Fluent
+public final class MonitoredResourceInner {
+ /*
+ * The ARM id of the resource.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * Flag indicating if resource is sending metrics to NewRelic.
+ */
+ @JsonProperty(value = "sendingMetrics")
+ private SendingMetricsStatus sendingMetrics;
+
+ /*
+ * Reason for why the resource is sending metrics (or why it is not sending).
+ */
+ @JsonProperty(value = "reasonForMetricsStatus")
+ private String reasonForMetricsStatus;
+
+ /*
+ * Flag indicating if resource is sending logs to NewRelic.
+ */
+ @JsonProperty(value = "sendingLogs")
+ private SendingLogsStatus sendingLogs;
+
+ /*
+ * Reason for why the resource is sending logs (or why it is not sending).
+ */
+ @JsonProperty(value = "reasonForLogsStatus")
+ 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 NewRelic.
+ *
+ * @return the sendingMetrics value.
+ */
+ public SendingMetricsStatus sendingMetrics() {
+ return this.sendingMetrics;
+ }
+
+ /**
+ * Set the sendingMetrics property: Flag indicating if resource is sending metrics to NewRelic.
+ *
+ * @param sendingMetrics the sendingMetrics value to set.
+ * @return the MonitoredResourceInner object itself.
+ */
+ public MonitoredResourceInner withSendingMetrics(SendingMetricsStatus 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 NewRelic.
+ *
+ * @return the sendingLogs value.
+ */
+ public SendingLogsStatus sendingLogs() {
+ return this.sendingLogs;
+ }
+
+ /**
+ * Set the sendingLogs property: Flag indicating if resource is sending logs to NewRelic.
+ *
+ * @param sendingLogs the sendingLogs value to set.
+ * @return the MonitoredResourceInner object itself.
+ */
+ public MonitoredResourceInner withSendingLogs(SendingLogsStatus sendingLogs) {
+ this.sendingLogs = sendingLogs;
+ return this;
+ }
+
+ /**
+ * 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() {
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MonitoringTagRulesPropertiesInner.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MonitoringTagRulesPropertiesInner.java
new file mode 100644
index 0000000000000..d52542789b3f9
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MonitoringTagRulesPropertiesInner.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.resourcemanager.newrelicobservability.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.newrelicobservability.models.LogRules;
+import com.azure.resourcemanager.newrelicobservability.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The resource-specific properties for this resource. */
+@Fluent
+public final class MonitoringTagRulesPropertiesInner {
+ /*
+ * Provisioning State of the resource
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /*
+ * Set of rules for sending logs for the Monitor resource.
+ */
+ @JsonProperty(value = "logRules")
+ private LogRules logRules;
+
+ /*
+ * Set of rules for sending metrics for the Monitor resource.
+ */
+ @JsonProperty(value = "metricRules")
+ private MetricRulesInner metricRules;
+
+ /** Creates an instance of MonitoringTagRulesPropertiesInner class. */
+ public MonitoringTagRulesPropertiesInner() {
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning State of the resource.
+ *
+ * @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 MonitoringTagRulesPropertiesInner object itself.
+ */
+ public MonitoringTagRulesPropertiesInner withLogRules(LogRules logRules) {
+ this.logRules = logRules;
+ return this;
+ }
+
+ /**
+ * Get the metricRules property: Set of rules for sending metrics for the Monitor resource.
+ *
+ * @return the metricRules value.
+ */
+ public MetricRulesInner metricRules() {
+ return this.metricRules;
+ }
+
+ /**
+ * Set the metricRules property: Set of rules for sending metrics for the Monitor resource.
+ *
+ * @param metricRules the metricRules value to set.
+ * @return the MonitoringTagRulesPropertiesInner object itself.
+ */
+ public MonitoringTagRulesPropertiesInner withMetricRules(MetricRulesInner metricRules) {
+ this.metricRules = metricRules;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (logRules() != null) {
+ logRules().validate();
+ }
+ if (metricRules() != null) {
+ metricRules().validate();
+ }
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/NewRelicMonitorResourceInner.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/NewRelicMonitorResourceInner.java
new file mode 100644
index 0000000000000..54fbf990fbf46
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/NewRelicMonitorResourceInner.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.resourcemanager.newrelicobservability.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.resourcemanager.newrelicobservability.models.AccountCreationSource;
+import com.azure.resourcemanager.newrelicobservability.models.LiftrResourceCategories;
+import com.azure.resourcemanager.newrelicobservability.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.newrelicobservability.models.MarketplaceSubscriptionStatus;
+import com.azure.resourcemanager.newrelicobservability.models.MonitoringStatus;
+import com.azure.resourcemanager.newrelicobservability.models.NewRelicAccountProperties;
+import com.azure.resourcemanager.newrelicobservability.models.OrgCreationSource;
+import com.azure.resourcemanager.newrelicobservability.models.PlanData;
+import com.azure.resourcemanager.newrelicobservability.models.ProvisioningState;
+import com.azure.resourcemanager.newrelicobservability.models.UserInfo;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** A Monitor Resource by NewRelic. */
+@Fluent
+public final class NewRelicMonitorResourceInner extends Resource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ @JsonProperty(value = "properties", required = true)
+ private MonitorProperties innerProperties = new MonitorProperties();
+
+ /*
+ * 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 NewRelicMonitorResourceInner class. */
+ public NewRelicMonitorResourceInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The resource-specific properties for this resource.
+ *
+ * @return the innerProperties value.
+ */
+ private MonitorProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * 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 NewRelicMonitorResourceInner object itself.
+ */
+ public NewRelicMonitorResourceInner 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 NewRelicMonitorResourceInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public NewRelicMonitorResourceInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning State of the resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Get the monitoringStatus property: MonitoringStatus of the resource.
+ *
+ * @return the monitoringStatus value.
+ */
+ public MonitoringStatus monitoringStatus() {
+ return this.innerProperties() == null ? null : this.innerProperties().monitoringStatus();
+ }
+
+ /**
+ * Get the marketplaceSubscriptionStatus property: NewRelic Organization properties of the resource.
+ *
+ * @return the marketplaceSubscriptionStatus value.
+ */
+ public MarketplaceSubscriptionStatus marketplaceSubscriptionStatus() {
+ return this.innerProperties() == null ? null : this.innerProperties().marketplaceSubscriptionStatus();
+ }
+
+ /**
+ * Get the marketplaceSubscriptionId property: Marketplace Subscription Id.
+ *
+ * @return the marketplaceSubscriptionId value.
+ */
+ public String marketplaceSubscriptionId() {
+ return this.innerProperties() == null ? null : this.innerProperties().marketplaceSubscriptionId();
+ }
+
+ /**
+ * Get the newRelicAccountProperties property: MarketplaceSubscriptionStatus of the resource.
+ *
+ * @return the newRelicAccountProperties value.
+ */
+ public NewRelicAccountProperties newRelicAccountProperties() {
+ return this.innerProperties() == null ? null : this.innerProperties().newRelicAccountProperties();
+ }
+
+ /**
+ * Set the newRelicAccountProperties property: MarketplaceSubscriptionStatus of the resource.
+ *
+ * @param newRelicAccountProperties the newRelicAccountProperties value to set.
+ * @return the NewRelicMonitorResourceInner object itself.
+ */
+ public NewRelicMonitorResourceInner withNewRelicAccountProperties(
+ NewRelicAccountProperties newRelicAccountProperties) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new MonitorProperties();
+ }
+ this.innerProperties().withNewRelicAccountProperties(newRelicAccountProperties);
+ return this;
+ }
+
+ /**
+ * Get the userInfo property: User Info.
+ *
+ * @return the userInfo value.
+ */
+ public UserInfo userInfo() {
+ return this.innerProperties() == null ? null : this.innerProperties().userInfo();
+ }
+
+ /**
+ * Set the userInfo property: User Info.
+ *
+ * @param userInfo the userInfo value to set.
+ * @return the NewRelicMonitorResourceInner object itself.
+ */
+ public NewRelicMonitorResourceInner withUserInfo(UserInfo userInfo) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new MonitorProperties();
+ }
+ this.innerProperties().withUserInfo(userInfo);
+ return this;
+ }
+
+ /**
+ * Get the planData property: Plan details.
+ *
+ * @return the planData value.
+ */
+ public PlanData planData() {
+ return this.innerProperties() == null ? null : this.innerProperties().planData();
+ }
+
+ /**
+ * Set the planData property: Plan details.
+ *
+ * @param planData the planData value to set.
+ * @return the NewRelicMonitorResourceInner object itself.
+ */
+ public NewRelicMonitorResourceInner withPlanData(PlanData planData) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new MonitorProperties();
+ }
+ this.innerProperties().withPlanData(planData);
+ return this;
+ }
+
+ /**
+ * Get the liftrResourceCategory property: Liftr resource category.
+ *
+ * @return the liftrResourceCategory value.
+ */
+ public LiftrResourceCategories liftrResourceCategory() {
+ return this.innerProperties() == null ? null : this.innerProperties().liftrResourceCategory();
+ }
+
+ /**
+ * Get the liftrResourcePreference property: Liftr resource preference. The priority of the resource.
+ *
+ * @return the liftrResourcePreference value.
+ */
+ public Integer liftrResourcePreference() {
+ return this.innerProperties() == null ? null : this.innerProperties().liftrResourcePreference();
+ }
+
+ /**
+ * Get the orgCreationSource property: Source of org creation.
+ *
+ * @return the orgCreationSource value.
+ */
+ public OrgCreationSource orgCreationSource() {
+ return this.innerProperties() == null ? null : this.innerProperties().orgCreationSource();
+ }
+
+ /**
+ * Set the orgCreationSource property: Source of org creation.
+ *
+ * @param orgCreationSource the orgCreationSource value to set.
+ * @return the NewRelicMonitorResourceInner object itself.
+ */
+ public NewRelicMonitorResourceInner withOrgCreationSource(OrgCreationSource orgCreationSource) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new MonitorProperties();
+ }
+ this.innerProperties().withOrgCreationSource(orgCreationSource);
+ return this;
+ }
+
+ /**
+ * Get the accountCreationSource property: Source of account creation.
+ *
+ * @return the accountCreationSource value.
+ */
+ public AccountCreationSource accountCreationSource() {
+ return this.innerProperties() == null ? null : this.innerProperties().accountCreationSource();
+ }
+
+ /**
+ * Set the accountCreationSource property: Source of account creation.
+ *
+ * @param accountCreationSource the accountCreationSource value to set.
+ * @return the NewRelicMonitorResourceInner object itself.
+ */
+ public NewRelicMonitorResourceInner withAccountCreationSource(AccountCreationSource accountCreationSource) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new MonitorProperties();
+ }
+ this.innerProperties().withAccountCreationSource(accountCreationSource);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property innerProperties in model NewRelicMonitorResourceInner"));
+ } else {
+ innerProperties().validate();
+ }
+ if (identity() != null) {
+ identity().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(NewRelicMonitorResourceInner.class);
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/NewRelicMonitorResourceUpdateProperties.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/NewRelicMonitorResourceUpdateProperties.java
new file mode 100644
index 0000000000000..0d8d715951c77
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/NewRelicMonitorResourceUpdateProperties.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.newrelicobservability.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.newrelicobservability.models.AccountCreationSource;
+import com.azure.resourcemanager.newrelicobservability.models.NewRelicAccountProperties;
+import com.azure.resourcemanager.newrelicobservability.models.OrgCreationSource;
+import com.azure.resourcemanager.newrelicobservability.models.PlanData;
+import com.azure.resourcemanager.newrelicobservability.models.UserInfo;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The updatable properties of the NewRelicMonitorResource. */
+@Fluent
+public final class NewRelicMonitorResourceUpdateProperties {
+ /*
+ * MarketplaceSubscriptionStatus of the resource
+ */
+ @JsonProperty(value = "newRelicAccountProperties")
+ private NewRelicAccountProperties newRelicAccountProperties;
+
+ /*
+ * User Info
+ */
+ @JsonProperty(value = "userInfo")
+ private UserInfo userInfo;
+
+ /*
+ * Plan details
+ */
+ @JsonProperty(value = "planData")
+ private PlanData planData;
+
+ /*
+ * Source of org creation
+ */
+ @JsonProperty(value = "orgCreationSource")
+ private OrgCreationSource orgCreationSource;
+
+ /*
+ * Source of account creation
+ */
+ @JsonProperty(value = "accountCreationSource")
+ private AccountCreationSource accountCreationSource;
+
+ /** Creates an instance of NewRelicMonitorResourceUpdateProperties class. */
+ public NewRelicMonitorResourceUpdateProperties() {
+ }
+
+ /**
+ * Get the newRelicAccountProperties property: MarketplaceSubscriptionStatus of the resource.
+ *
+ * @return the newRelicAccountProperties value.
+ */
+ public NewRelicAccountProperties newRelicAccountProperties() {
+ return this.newRelicAccountProperties;
+ }
+
+ /**
+ * Set the newRelicAccountProperties property: MarketplaceSubscriptionStatus of the resource.
+ *
+ * @param newRelicAccountProperties the newRelicAccountProperties value to set.
+ * @return the NewRelicMonitorResourceUpdateProperties object itself.
+ */
+ public NewRelicMonitorResourceUpdateProperties withNewRelicAccountProperties(
+ NewRelicAccountProperties newRelicAccountProperties) {
+ this.newRelicAccountProperties = newRelicAccountProperties;
+ return this;
+ }
+
+ /**
+ * Get the userInfo property: User Info.
+ *
+ * @return the userInfo value.
+ */
+ public UserInfo userInfo() {
+ return this.userInfo;
+ }
+
+ /**
+ * Set the userInfo property: User Info.
+ *
+ * @param userInfo the userInfo value to set.
+ * @return the NewRelicMonitorResourceUpdateProperties object itself.
+ */
+ public NewRelicMonitorResourceUpdateProperties withUserInfo(UserInfo userInfo) {
+ this.userInfo = userInfo;
+ return this;
+ }
+
+ /**
+ * Get the planData property: Plan details.
+ *
+ * @return the planData value.
+ */
+ public PlanData planData() {
+ return this.planData;
+ }
+
+ /**
+ * Set the planData property: Plan details.
+ *
+ * @param planData the planData value to set.
+ * @return the NewRelicMonitorResourceUpdateProperties object itself.
+ */
+ public NewRelicMonitorResourceUpdateProperties withPlanData(PlanData planData) {
+ this.planData = planData;
+ return this;
+ }
+
+ /**
+ * Get the orgCreationSource property: Source of org creation.
+ *
+ * @return the orgCreationSource value.
+ */
+ public OrgCreationSource orgCreationSource() {
+ return this.orgCreationSource;
+ }
+
+ /**
+ * Set the orgCreationSource property: Source of org creation.
+ *
+ * @param orgCreationSource the orgCreationSource value to set.
+ * @return the NewRelicMonitorResourceUpdateProperties object itself.
+ */
+ public NewRelicMonitorResourceUpdateProperties withOrgCreationSource(OrgCreationSource orgCreationSource) {
+ this.orgCreationSource = orgCreationSource;
+ return this;
+ }
+
+ /**
+ * Get the accountCreationSource property: Source of account creation.
+ *
+ * @return the accountCreationSource value.
+ */
+ public AccountCreationSource accountCreationSource() {
+ return this.accountCreationSource;
+ }
+
+ /**
+ * Set the accountCreationSource property: Source of account creation.
+ *
+ * @param accountCreationSource the accountCreationSource value to set.
+ * @return the NewRelicMonitorResourceUpdateProperties object itself.
+ */
+ public NewRelicMonitorResourceUpdateProperties withAccountCreationSource(
+ AccountCreationSource accountCreationSource) {
+ this.accountCreationSource = accountCreationSource;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (newRelicAccountProperties() != null) {
+ newRelicAccountProperties().validate();
+ }
+ if (userInfo() != null) {
+ userInfo().validate();
+ }
+ if (planData() != null) {
+ planData().validate();
+ }
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/OperationInner.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/OperationInner.java
new file mode 100644
index 0000000000000..ea0884c17c93c
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/OperationInner.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.newrelicobservability.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.newrelicobservability.models.ActionType;
+import com.azure.resourcemanager.newrelicobservability.models.OperationDisplay;
+import com.azure.resourcemanager.newrelicobservability.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/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/OrganizationProperties.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/OrganizationProperties.java
new file mode 100644
index 0000000000000..3aac3269f2783
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/OrganizationProperties.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.newrelicobservability.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.newrelicobservability.models.BillingSource;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Details of Organizations. */
+@Fluent
+public final class OrganizationProperties {
+ /*
+ * organization id
+ */
+ @JsonProperty(value = "organizationId")
+ private String organizationId;
+
+ /*
+ * organization name
+ */
+ @JsonProperty(value = "organizationName")
+ private String organizationName;
+
+ /*
+ * Billing source
+ */
+ @JsonProperty(value = "billingSource")
+ private BillingSource billingSource;
+
+ /** Creates an instance of OrganizationProperties class. */
+ public OrganizationProperties() {
+ }
+
+ /**
+ * Get the organizationId property: organization id.
+ *
+ * @return the organizationId value.
+ */
+ public String organizationId() {
+ return this.organizationId;
+ }
+
+ /**
+ * Set the organizationId property: organization id.
+ *
+ * @param organizationId the organizationId value to set.
+ * @return the OrganizationProperties object itself.
+ */
+ public OrganizationProperties withOrganizationId(String organizationId) {
+ this.organizationId = organizationId;
+ return this;
+ }
+
+ /**
+ * Get the organizationName property: organization name.
+ *
+ * @return the organizationName value.
+ */
+ public String organizationName() {
+ return this.organizationName;
+ }
+
+ /**
+ * Set the organizationName property: organization name.
+ *
+ * @param organizationName the organizationName value to set.
+ * @return the OrganizationProperties object itself.
+ */
+ public OrganizationProperties withOrganizationName(String organizationName) {
+ this.organizationName = organizationName;
+ return this;
+ }
+
+ /**
+ * Get the billingSource property: Billing source.
+ *
+ * @return the billingSource value.
+ */
+ public BillingSource billingSource() {
+ return this.billingSource;
+ }
+
+ /**
+ * Set the billingSource property: Billing source.
+ *
+ * @param billingSource the billingSource value to set.
+ * @return the OrganizationProperties object itself.
+ */
+ public OrganizationProperties withBillingSource(BillingSource billingSource) {
+ this.billingSource = billingSource;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/OrganizationResourceInner.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/OrganizationResourceInner.java
new file mode 100644
index 0000000000000..e4c77069e6c21
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/OrganizationResourceInner.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.newrelicobservability.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.newrelicobservability.models.BillingSource;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The details of a Organization resource. */
+@Fluent
+public final class OrganizationResourceInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ @JsonProperty(value = "properties")
+ private OrganizationProperties innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /** Creates an instance of OrganizationResourceInner class. */
+ public OrganizationResourceInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The resource-specific properties for this resource.
+ *
+ * @return the innerProperties value.
+ */
+ private OrganizationProperties 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 organizationId property: organization id.
+ *
+ * @return the organizationId value.
+ */
+ public String organizationId() {
+ return this.innerProperties() == null ? null : this.innerProperties().organizationId();
+ }
+
+ /**
+ * Set the organizationId property: organization id.
+ *
+ * @param organizationId the organizationId value to set.
+ * @return the OrganizationResourceInner object itself.
+ */
+ public OrganizationResourceInner withOrganizationId(String organizationId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new OrganizationProperties();
+ }
+ this.innerProperties().withOrganizationId(organizationId);
+ return this;
+ }
+
+ /**
+ * Get the organizationName property: organization name.
+ *
+ * @return the organizationName value.
+ */
+ public String organizationName() {
+ return this.innerProperties() == null ? null : this.innerProperties().organizationName();
+ }
+
+ /**
+ * Set the organizationName property: organization name.
+ *
+ * @param organizationName the organizationName value to set.
+ * @return the OrganizationResourceInner object itself.
+ */
+ public OrganizationResourceInner withOrganizationName(String organizationName) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new OrganizationProperties();
+ }
+ this.innerProperties().withOrganizationName(organizationName);
+ return this;
+ }
+
+ /**
+ * Get the billingSource property: Billing source.
+ *
+ * @return the billingSource value.
+ */
+ public BillingSource billingSource() {
+ return this.innerProperties() == null ? null : this.innerProperties().billingSource();
+ }
+
+ /**
+ * Set the billingSource property: Billing source.
+ *
+ * @param billingSource the billingSource value to set.
+ * @return the OrganizationResourceInner object itself.
+ */
+ public OrganizationResourceInner withBillingSource(BillingSource billingSource) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new OrganizationProperties();
+ }
+ this.innerProperties().withBillingSource(billingSource);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/PlanDataProperties.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/PlanDataProperties.java
new file mode 100644
index 0000000000000..b4ab5beb338a0
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/PlanDataProperties.java
@@ -0,0 +1,108 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.newrelicobservability.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.newrelicobservability.models.AccountCreationSource;
+import com.azure.resourcemanager.newrelicobservability.models.OrgCreationSource;
+import com.azure.resourcemanager.newrelicobservability.models.PlanData;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Plan details. */
+@Fluent
+public final class PlanDataProperties {
+ /*
+ * Plan details
+ */
+ @JsonProperty(value = "planData")
+ private PlanData planData;
+
+ /*
+ * Source of org creation
+ */
+ @JsonProperty(value = "orgCreationSource")
+ private OrgCreationSource orgCreationSource;
+
+ /*
+ * Source of account creation
+ */
+ @JsonProperty(value = "accountCreationSource")
+ private AccountCreationSource accountCreationSource;
+
+ /** Creates an instance of PlanDataProperties class. */
+ public PlanDataProperties() {
+ }
+
+ /**
+ * Get the planData property: Plan details.
+ *
+ * @return the planData value.
+ */
+ public PlanData planData() {
+ return this.planData;
+ }
+
+ /**
+ * Set the planData property: Plan details.
+ *
+ * @param planData the planData value to set.
+ * @return the PlanDataProperties object itself.
+ */
+ public PlanDataProperties withPlanData(PlanData planData) {
+ this.planData = planData;
+ return this;
+ }
+
+ /**
+ * Get the orgCreationSource property: Source of org creation.
+ *
+ * @return the orgCreationSource value.
+ */
+ public OrgCreationSource orgCreationSource() {
+ return this.orgCreationSource;
+ }
+
+ /**
+ * Set the orgCreationSource property: Source of org creation.
+ *
+ * @param orgCreationSource the orgCreationSource value to set.
+ * @return the PlanDataProperties object itself.
+ */
+ public PlanDataProperties withOrgCreationSource(OrgCreationSource orgCreationSource) {
+ this.orgCreationSource = orgCreationSource;
+ return this;
+ }
+
+ /**
+ * Get the accountCreationSource property: Source of account creation.
+ *
+ * @return the accountCreationSource value.
+ */
+ public AccountCreationSource accountCreationSource() {
+ return this.accountCreationSource;
+ }
+
+ /**
+ * Set the accountCreationSource property: Source of account creation.
+ *
+ * @param accountCreationSource the accountCreationSource value to set.
+ * @return the PlanDataProperties object itself.
+ */
+ public PlanDataProperties withAccountCreationSource(AccountCreationSource accountCreationSource) {
+ this.accountCreationSource = accountCreationSource;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (planData() != null) {
+ planData().validate();
+ }
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/PlanDataResourceInner.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/PlanDataResourceInner.java
new file mode 100644
index 0000000000000..d541fd5140838
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/PlanDataResourceInner.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.newrelicobservability.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.newrelicobservability.models.AccountCreationSource;
+import com.azure.resourcemanager.newrelicobservability.models.OrgCreationSource;
+import com.azure.resourcemanager.newrelicobservability.models.PlanData;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The details of a PlanData resource. */
+@Fluent
+public final class PlanDataResourceInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ @JsonProperty(value = "properties")
+ private PlanDataProperties innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /** Creates an instance of PlanDataResourceInner class. */
+ public PlanDataResourceInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The resource-specific properties for this resource.
+ *
+ * @return the innerProperties value.
+ */
+ private PlanDataProperties 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 planData property: Plan details.
+ *
+ * @return the planData value.
+ */
+ public PlanData planData() {
+ return this.innerProperties() == null ? null : this.innerProperties().planData();
+ }
+
+ /**
+ * Set the planData property: Plan details.
+ *
+ * @param planData the planData value to set.
+ * @return the PlanDataResourceInner object itself.
+ */
+ public PlanDataResourceInner withPlanData(PlanData planData) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PlanDataProperties();
+ }
+ this.innerProperties().withPlanData(planData);
+ return this;
+ }
+
+ /**
+ * Get the orgCreationSource property: Source of org creation.
+ *
+ * @return the orgCreationSource value.
+ */
+ public OrgCreationSource orgCreationSource() {
+ return this.innerProperties() == null ? null : this.innerProperties().orgCreationSource();
+ }
+
+ /**
+ * Set the orgCreationSource property: Source of org creation.
+ *
+ * @param orgCreationSource the orgCreationSource value to set.
+ * @return the PlanDataResourceInner object itself.
+ */
+ public PlanDataResourceInner withOrgCreationSource(OrgCreationSource orgCreationSource) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PlanDataProperties();
+ }
+ this.innerProperties().withOrgCreationSource(orgCreationSource);
+ return this;
+ }
+
+ /**
+ * Get the accountCreationSource property: Source of account creation.
+ *
+ * @return the accountCreationSource value.
+ */
+ public AccountCreationSource accountCreationSource() {
+ return this.innerProperties() == null ? null : this.innerProperties().accountCreationSource();
+ }
+
+ /**
+ * Set the accountCreationSource property: Source of account creation.
+ *
+ * @param accountCreationSource the accountCreationSource value to set.
+ * @return the PlanDataResourceInner object itself.
+ */
+ public PlanDataResourceInner withAccountCreationSource(AccountCreationSource accountCreationSource) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PlanDataProperties();
+ }
+ this.innerProperties().withAccountCreationSource(accountCreationSource);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/TagRuleInner.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/TagRuleInner.java
new file mode 100644
index 0000000000000..8a237df6055a4
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/TagRuleInner.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.newrelicobservability.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.resourcemanager.newrelicobservability.models.LogRules;
+import com.azure.resourcemanager.newrelicobservability.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A tag rule belonging to NewRelic account. */
+@Fluent
+public final class TagRuleInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ @JsonProperty(value = "properties", required = true)
+ private MonitoringTagRulesPropertiesInner innerProperties = new MonitoringTagRulesPropertiesInner();
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /** Creates an instance of TagRuleInner class. */
+ public TagRuleInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The resource-specific properties for this resource.
+ *
+ * @return the innerProperties value.
+ */
+ private MonitoringTagRulesPropertiesInner 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 provisioningState property: Provisioning State of the resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Get the logRules property: Set of rules for sending logs for the Monitor resource.
+ *
+ * @return the logRules value.
+ */
+ public LogRules logRules() {
+ return this.innerProperties() == null ? null : this.innerProperties().logRules();
+ }
+
+ /**
+ * Set the logRules property: Set of rules for sending logs for the Monitor resource.
+ *
+ * @param logRules the logRules value to set.
+ * @return the TagRuleInner object itself.
+ */
+ public TagRuleInner withLogRules(LogRules logRules) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new MonitoringTagRulesPropertiesInner();
+ }
+ this.innerProperties().withLogRules(logRules);
+ return this;
+ }
+
+ /**
+ * Get the metricRules property: Set of rules for sending metrics for the Monitor resource.
+ *
+ * @return the metricRules value.
+ */
+ public MetricRulesInner metricRules() {
+ return this.innerProperties() == null ? null : this.innerProperties().metricRules();
+ }
+
+ /**
+ * Set the metricRules property: Set of rules for sending metrics for the Monitor resource.
+ *
+ * @param metricRules the metricRules value to set.
+ * @return the TagRuleInner object itself.
+ */
+ public TagRuleInner withMetricRules(MetricRulesInner metricRules) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new MonitoringTagRulesPropertiesInner();
+ }
+ this.innerProperties().withMetricRules(metricRules);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property innerProperties in model TagRuleInner"));
+ } else {
+ innerProperties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(TagRuleInner.class);
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/TagRuleUpdateInner.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/TagRuleUpdateInner.java
new file mode 100644
index 0000000000000..dfef473f2a644
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/TagRuleUpdateInner.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.newrelicobservability.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.newrelicobservability.models.LogRules;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The type used for update operations of the TagRule. */
+@Fluent
+public final class TagRuleUpdateInner {
+ /*
+ * The updatable properties of the TagRule.
+ */
+ @JsonProperty(value = "properties")
+ private TagRuleUpdatePropertiesInner innerProperties;
+
+ /** Creates an instance of TagRuleUpdateInner class. */
+ public TagRuleUpdateInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The updatable properties of the TagRule.
+ *
+ * @return the innerProperties value.
+ */
+ private TagRuleUpdatePropertiesInner innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the logRules property: Set of rules for sending logs for the Monitor resource.
+ *
+ * @return the logRules value.
+ */
+ public LogRules logRules() {
+ return this.innerProperties() == null ? null : this.innerProperties().logRules();
+ }
+
+ /**
+ * Set the logRules property: Set of rules for sending logs for the Monitor resource.
+ *
+ * @param logRules the logRules value to set.
+ * @return the TagRuleUpdateInner object itself.
+ */
+ public TagRuleUpdateInner withLogRules(LogRules logRules) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new TagRuleUpdatePropertiesInner();
+ }
+ this.innerProperties().withLogRules(logRules);
+ return this;
+ }
+
+ /**
+ * Get the metricRules property: Set of rules for sending metrics for the Monitor resource.
+ *
+ * @return the metricRules value.
+ */
+ public MetricRulesInner metricRules() {
+ return this.innerProperties() == null ? null : this.innerProperties().metricRules();
+ }
+
+ /**
+ * Set the metricRules property: Set of rules for sending metrics for the Monitor resource.
+ *
+ * @param metricRules the metricRules value to set.
+ * @return the TagRuleUpdateInner object itself.
+ */
+ public TagRuleUpdateInner withMetricRules(MetricRulesInner metricRules) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new TagRuleUpdatePropertiesInner();
+ }
+ this.innerProperties().withMetricRules(metricRules);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/TagRuleUpdatePropertiesInner.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/TagRuleUpdatePropertiesInner.java
new file mode 100644
index 0000000000000..687bdad877088
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/TagRuleUpdatePropertiesInner.java
@@ -0,0 +1,83 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.newrelicobservability.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.newrelicobservability.models.LogRules;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The updatable properties of the TagRule. */
+@Fluent
+public final class TagRuleUpdatePropertiesInner {
+ /*
+ * Set of rules for sending logs for the Monitor resource.
+ */
+ @JsonProperty(value = "logRules")
+ private LogRules logRules;
+
+ /*
+ * Set of rules for sending metrics for the Monitor resource.
+ */
+ @JsonProperty(value = "metricRules")
+ private MetricRulesInner metricRules;
+
+ /** Creates an instance of TagRuleUpdatePropertiesInner class. */
+ public TagRuleUpdatePropertiesInner() {
+ }
+
+ /**
+ * 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 TagRuleUpdatePropertiesInner object itself.
+ */
+ public TagRuleUpdatePropertiesInner withLogRules(LogRules logRules) {
+ this.logRules = logRules;
+ return this;
+ }
+
+ /**
+ * Get the metricRules property: Set of rules for sending metrics for the Monitor resource.
+ *
+ * @return the metricRules value.
+ */
+ public MetricRulesInner metricRules() {
+ return this.metricRules;
+ }
+
+ /**
+ * Set the metricRules property: Set of rules for sending metrics for the Monitor resource.
+ *
+ * @param metricRules the metricRules value to set.
+ * @return the TagRuleUpdatePropertiesInner object itself.
+ */
+ public TagRuleUpdatePropertiesInner withMetricRules(MetricRulesInner metricRules) {
+ this.metricRules = metricRules;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (logRules() != null) {
+ logRules().validate();
+ }
+ if (metricRules() != null) {
+ metricRules().validate();
+ }
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/VMExtensionPayloadInner.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/VMExtensionPayloadInner.java
new file mode 100644
index 0000000000000..c8bd75268003c
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/VMExtensionPayloadInner.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.newrelicobservability.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Response of payload to be passed while installing VM agent. */
+@Fluent
+public final class VMExtensionPayloadInner {
+ /*
+ * Ingestion key of the account
+ */
+ @JsonProperty(value = "ingestionKey")
+ private String ingestionKey;
+
+ /** Creates an instance of VMExtensionPayloadInner class. */
+ public VMExtensionPayloadInner() {
+ }
+
+ /**
+ * Get the ingestionKey property: Ingestion key of the account.
+ *
+ * @return the ingestionKey value.
+ */
+ public String ingestionKey() {
+ return this.ingestionKey;
+ }
+
+ /**
+ * Set the ingestionKey property: Ingestion key of the account.
+ *
+ * @param ingestionKey the ingestionKey value to set.
+ * @return the VMExtensionPayloadInner object itself.
+ */
+ public VMExtensionPayloadInner withIngestionKey(String ingestionKey) {
+ this.ingestionKey = ingestionKey;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/VMInfoInner.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/VMInfoInner.java
new file mode 100644
index 0000000000000..34029b0c1850d
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/VMInfoInner.java
@@ -0,0 +1,102 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.newrelicobservability.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Details of VM Resource having NewRelic OneAgent installed. */
+@Fluent
+public final class VMInfoInner {
+ /*
+ * Azure VM resource ID
+ */
+ @JsonProperty(value = "vmId")
+ private String vmId;
+
+ /*
+ * Version of the NewRelic agent installed on the VM.
+ */
+ @JsonProperty(value = "agentVersion")
+ private String agentVersion;
+
+ /*
+ * Status of the NewRelic agent installed on the VM.
+ */
+ @JsonProperty(value = "agentStatus")
+ private String agentStatus;
+
+ /** Creates an instance of VMInfoInner class. */
+ public VMInfoInner() {
+ }
+
+ /**
+ * Get the vmId property: Azure VM resource ID.
+ *
+ * @return the vmId value.
+ */
+ public String vmId() {
+ return this.vmId;
+ }
+
+ /**
+ * Set the vmId property: Azure VM resource ID.
+ *
+ * @param vmId the vmId value to set.
+ * @return the VMInfoInner object itself.
+ */
+ public VMInfoInner withVmId(String vmId) {
+ this.vmId = vmId;
+ return this;
+ }
+
+ /**
+ * Get the agentVersion property: Version of the NewRelic agent installed on the VM.
+ *
+ * @return the agentVersion value.
+ */
+ public String agentVersion() {
+ return this.agentVersion;
+ }
+
+ /**
+ * Set the agentVersion property: Version of the NewRelic agent installed on the VM.
+ *
+ * @param agentVersion the agentVersion value to set.
+ * @return the VMInfoInner object itself.
+ */
+ public VMInfoInner withAgentVersion(String agentVersion) {
+ this.agentVersion = agentVersion;
+ return this;
+ }
+
+ /**
+ * Get the agentStatus property: Status of the NewRelic agent installed on the VM.
+ *
+ * @return the agentStatus value.
+ */
+ public String agentStatus() {
+ return this.agentStatus;
+ }
+
+ /**
+ * Set the agentStatus property: Status of the NewRelic agent installed on the VM.
+ *
+ * @param agentStatus the agentStatus value to set.
+ * @return the VMInfoInner object itself.
+ */
+ public VMInfoInner withAgentStatus(String agentStatus) {
+ this.agentStatus = agentStatus;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/package-info.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/package-info.java
new file mode 100644
index 0000000000000..92ec93e13d33e
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/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 inner data models for NewRelicObservability. null. */
+package com.azure.resourcemanager.newrelicobservability.fluent.models;
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/package-info.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/package-info.java
new file mode 100644
index 0000000000000..9639651ea926e
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/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 service clients for NewRelicObservability. null. */
+package com.azure.resourcemanager.newrelicobservability.fluent;
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/AccountResourceImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/AccountResourceImpl.java
new file mode 100644
index 0000000000000..02212054a6241
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/AccountResourceImpl.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.newrelicobservability.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.newrelicobservability.fluent.models.AccountResourceInner;
+import com.azure.resourcemanager.newrelicobservability.models.AccountResource;
+
+public final class AccountResourceImpl implements AccountResource {
+ private AccountResourceInner innerObject;
+
+ private final com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager serviceManager;
+
+ AccountResourceImpl(
+ AccountResourceInner innerObject,
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager 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 String organizationId() {
+ return this.innerModel().organizationId();
+ }
+
+ public String accountId() {
+ return this.innerModel().accountId();
+ }
+
+ public String accountName() {
+ return this.innerModel().accountName();
+ }
+
+ public String region() {
+ return this.innerModel().region();
+ }
+
+ public AccountResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/AccountsClientImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/AccountsClientImpl.java
new file mode 100644
index 0000000000000..a04acdb1b9fb5
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/AccountsClientImpl.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.resourcemanager.newrelicobservability.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.newrelicobservability.fluent.AccountsClient;
+import com.azure.resourcemanager.newrelicobservability.fluent.models.AccountResourceInner;
+import com.azure.resourcemanager.newrelicobservability.models.AccountsListResponse;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in AccountsClient. */
+public final class AccountsClientImpl implements AccountsClient {
+ /** The proxy service used to perform REST calls. */
+ private final AccountsService service;
+
+ /** The service client containing this operation class. */
+ private final NewRelicObservabilityImpl client;
+
+ /**
+ * Initializes an instance of AccountsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ AccountsClientImpl(NewRelicObservabilityImpl client) {
+ this.service = RestProxy.create(AccountsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for NewRelicObservabilityAccounts to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "NewRelicObservabilit")
+ public interface AccountsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/NewRelic.Observability/accounts")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("userEmail") String userEmail,
+ @QueryParam("location") String location,
+ @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 the existing accounts.
+ *
+ * @param userEmail User Email.
+ * @param location Location for NewRelic.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 get all accounts Operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String userEmail, 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 (userEmail == null) {
+ return Mono.error(new IllegalArgumentException("Parameter userEmail 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(),
+ userEmail,
+ 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 the existing accounts.
+ *
+ * @param userEmail User Email.
+ * @param location Location for NewRelic.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 get all accounts Operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String userEmail, 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 (userEmail == null) {
+ return Mono.error(new IllegalArgumentException("Parameter userEmail 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(),
+ userEmail,
+ location,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List all the existing accounts.
+ *
+ * @param userEmail User Email.
+ * @param location Location for NewRelic.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 get all accounts Operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String userEmail, String location) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(userEmail, location), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List all the existing accounts.
+ *
+ * @param userEmail User Email.
+ * @param location Location for NewRelic.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 get all accounts Operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String userEmail, String location, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(userEmail, location, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List all the existing accounts.
+ *
+ * @param userEmail User Email.
+ * @param location Location for NewRelic.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 get all accounts Operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String userEmail, String location) {
+ return new PagedIterable<>(listAsync(userEmail, location));
+ }
+
+ /**
+ * List all the existing accounts.
+ *
+ * @param userEmail User Email.
+ * @param location Location for NewRelic.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 get all accounts Operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String userEmail, String location, Context context) {
+ return new PagedIterable<>(listAsync(userEmail, location, 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 response of get all accounts 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
+ * 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 response of get all accounts 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/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/AccountsImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/AccountsImpl.java
new file mode 100644
index 0000000000000..c886051fb1ba0
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/AccountsImpl.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.newrelicobservability.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.newrelicobservability.fluent.AccountsClient;
+import com.azure.resourcemanager.newrelicobservability.fluent.models.AccountResourceInner;
+import com.azure.resourcemanager.newrelicobservability.models.AccountResource;
+import com.azure.resourcemanager.newrelicobservability.models.Accounts;
+
+public final class AccountsImpl implements Accounts {
+ private static final ClientLogger LOGGER = new ClientLogger(AccountsImpl.class);
+
+ private final AccountsClient innerClient;
+
+ private final com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager serviceManager;
+
+ public AccountsImpl(
+ AccountsClient innerClient,
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String userEmail, String location) {
+ PagedIterable inner = this.serviceClient().list(userEmail, location);
+ return Utils.mapPage(inner, inner1 -> new AccountResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String userEmail, String location, Context context) {
+ PagedIterable inner = this.serviceClient().list(userEmail, location, context);
+ return Utils.mapPage(inner, inner1 -> new AccountResourceImpl(inner1, this.manager()));
+ }
+
+ private AccountsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/AppServiceInfoImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/AppServiceInfoImpl.java
new file mode 100644
index 0000000000000..d23cb2edb8530
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/AppServiceInfoImpl.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.newrelicobservability.implementation;
+
+import com.azure.resourcemanager.newrelicobservability.fluent.models.AppServiceInfoInner;
+import com.azure.resourcemanager.newrelicobservability.models.AppServiceInfo;
+
+public final class AppServiceInfoImpl implements AppServiceInfo {
+ private AppServiceInfoInner innerObject;
+
+ private final com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager serviceManager;
+
+ AppServiceInfoImpl(
+ AppServiceInfoInner innerObject,
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String azureResourceId() {
+ return this.innerModel().azureResourceId();
+ }
+
+ public String agentVersion() {
+ return this.innerModel().agentVersion();
+ }
+
+ public String agentStatus() {
+ return this.innerModel().agentStatus();
+ }
+
+ public AppServiceInfoInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MetricRulesImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MetricRulesImpl.java
new file mode 100644
index 0000000000000..5f217ce0d08c3
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MetricRulesImpl.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.newrelicobservability.implementation;
+
+import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricRulesInner;
+import com.azure.resourcemanager.newrelicobservability.models.FilteringTag;
+import com.azure.resourcemanager.newrelicobservability.models.MetricRules;
+import com.azure.resourcemanager.newrelicobservability.models.SendMetricsStatus;
+import java.util.Collections;
+import java.util.List;
+
+public final class MetricRulesImpl implements MetricRules {
+ private MetricRulesInner innerObject;
+
+ private final com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager serviceManager;
+
+ MetricRulesImpl(
+ MetricRulesInner innerObject,
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public SendMetricsStatus sendMetrics() {
+ return this.innerModel().sendMetrics();
+ }
+
+ public List filteringTags() {
+ List inner = this.innerModel().filteringTags();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public String userEmail() {
+ return this.innerModel().userEmail();
+ }
+
+ public MetricRulesInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MetricsStatusResponseImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MetricsStatusResponseImpl.java
new file mode 100644
index 0000000000000..a3550a8900319
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MetricsStatusResponseImpl.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.newrelicobservability.implementation;
+
+import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricsStatusResponseInner;
+import com.azure.resourcemanager.newrelicobservability.models.MetricsStatusResponse;
+import java.util.Collections;
+import java.util.List;
+
+public final class MetricsStatusResponseImpl implements MetricsStatusResponse {
+ private MetricsStatusResponseInner innerObject;
+
+ private final com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager serviceManager;
+
+ MetricsStatusResponseImpl(
+ MetricsStatusResponseInner innerObject,
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public List azureResourceIds() {
+ List inner = this.innerModel().azureResourceIds();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public MetricsStatusResponseInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredResourceImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredResourceImpl.java
new file mode 100644
index 0000000000000..dbf820dee7c53
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredResourceImpl.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.newrelicobservability.implementation;
+
+import com.azure.resourcemanager.newrelicobservability.fluent.models.MonitoredResourceInner;
+import com.azure.resourcemanager.newrelicobservability.models.MonitoredResource;
+import com.azure.resourcemanager.newrelicobservability.models.SendingLogsStatus;
+import com.azure.resourcemanager.newrelicobservability.models.SendingMetricsStatus;
+
+public final class MonitoredResourceImpl implements MonitoredResource {
+ private MonitoredResourceInner innerObject;
+
+ private final com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager serviceManager;
+
+ MonitoredResourceImpl(
+ MonitoredResourceInner innerObject,
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public SendingMetricsStatus sendingMetrics() {
+ return this.innerModel().sendingMetrics();
+ }
+
+ public String reasonForMetricsStatus() {
+ return this.innerModel().reasonForMetricsStatus();
+ }
+
+ public SendingLogsStatus sendingLogs() {
+ return this.innerModel().sendingLogs();
+ }
+
+ public String reasonForLogsStatus() {
+ return this.innerModel().reasonForLogsStatus();
+ }
+
+ public MonitoredResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoringTagRulesPropertiesImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoringTagRulesPropertiesImpl.java
new file mode 100644
index 0000000000000..316db538be5a3
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoringTagRulesPropertiesImpl.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.newrelicobservability.implementation;
+
+import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricRulesInner;
+import com.azure.resourcemanager.newrelicobservability.fluent.models.MonitoringTagRulesPropertiesInner;
+import com.azure.resourcemanager.newrelicobservability.models.LogRules;
+import com.azure.resourcemanager.newrelicobservability.models.MetricRules;
+import com.azure.resourcemanager.newrelicobservability.models.MonitoringTagRulesProperties;
+import com.azure.resourcemanager.newrelicobservability.models.ProvisioningState;
+
+public final class MonitoringTagRulesPropertiesImpl implements MonitoringTagRulesProperties {
+ private MonitoringTagRulesPropertiesInner innerObject;
+
+ private final com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager serviceManager;
+
+ MonitoringTagRulesPropertiesImpl(
+ MonitoringTagRulesPropertiesInner innerObject,
+ com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public ProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public LogRules logRules() {
+ return this.innerModel().logRules();
+ }
+
+ public MetricRules metricRules() {
+ MetricRulesInner inner = this.innerModel().metricRules();
+ if (inner != null) {
+ return new MetricRulesImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public MonitoringTagRulesPropertiesInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitorsClientImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitorsClientImpl.java
new file mode 100644
index 0000000000000..fabf74bf73f8a
--- /dev/null
+++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitorsClientImpl.java
@@ -0,0 +1,3052 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.newrelicobservability.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.newrelicobservability.fluent.MonitorsClient;
+import com.azure.resourcemanager.newrelicobservability.fluent.models.AppServiceInfoInner;
+import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricRulesInner;
+import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricsStatusResponseInner;
+import com.azure.resourcemanager.newrelicobservability.fluent.models.MonitoredResourceInner;
+import com.azure.resourcemanager.newrelicobservability.fluent.models.NewRelicMonitorResourceInner;
+import com.azure.resourcemanager.newrelicobservability.fluent.models.VMExtensionPayloadInner;
+import com.azure.resourcemanager.newrelicobservability.fluent.models.VMInfoInner;
+import com.azure.resourcemanager.newrelicobservability.models.AppServicesGetRequest;
+import com.azure.resourcemanager.newrelicobservability.models.AppServicesListResponse;
+import com.azure.resourcemanager.newrelicobservability.models.HostsGetRequest;
+import com.azure.resourcemanager.newrelicobservability.models.MetricsRequest;
+import com.azure.resourcemanager.newrelicobservability.models.MetricsStatusRequest;
+import com.azure.resourcemanager.newrelicobservability.models.MonitoredResourceListResponse;
+import com.azure.resourcemanager.newrelicobservability.models.NewRelicMonitorResourceListResult;
+import com.azure.resourcemanager.newrelicobservability.models.NewRelicMonitorResourceUpdate;
+import com.azure.resourcemanager.newrelicobservability.models.SwitchBillingRequest;
+import com.azure.resourcemanager.newrelicobservability.models.VMHostsListResponse;
+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 NewRelicObservabilityImpl client;
+
+ /**
+ * Initializes an instance of MonitorsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ MonitorsClientImpl(NewRelicObservabilityImpl client) {
+ this.service = RestProxy.create(MonitorsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for NewRelicObservabilityMonitors to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "NewRelicObservabilit")
+ public interface MonitorsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/NewRelic.Observability/monitors")
+ @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/NewRelic.Observability/monitors")
+ @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/NewRelic.Observability/monitors/{monitorName}")
+ @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("monitorName") String monitorName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}")
+ @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("monitorName") String monitorName,
+ @BodyParam("application/json") NewRelicMonitorResourceInner resource,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("monitorName") String monitorName,
+ @BodyParam("application/json") NewRelicMonitorResourceUpdate properties,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}")
+ @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,
+ @QueryParam("userEmail") String userEmail,
+ @PathParam("monitorName") String monitorName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/getMetricRules")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getMetricRules(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("monitorName") String monitorName,
+ @BodyParam("application/json") MetricsRequest request,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/getMetricStatus")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getMetricStatus(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("monitorName") String monitorName,
+ @BodyParam("application/json") MetricsStatusRequest request,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listAppServices")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listAppServices(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("monitorName") String monitorName,
+ @BodyParam("application/json") AppServicesGetRequest request,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/switchBilling")
+ @ExpectedResponses({204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> switchBilling(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("monitorName") String monitorName,
+ @BodyParam("application/json") SwitchBillingRequest request,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listHosts")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listHosts(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("monitorName") String monitorName,
+ @BodyParam("application/json") HostsGetRequest request,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredResources")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listMonitoredResources(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("monitorName") String monitorName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/vmHostPayloads")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> vmHostPayload(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("monitorName") String monitorName,
+ @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> listAppServicesNext(
+ @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> listHostsNext(
+ @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);
+ }
+
+ /**
+ * List NewRelicMonitorResource resources by subscription ID.
+ *
+ * @throws ManagementException thrown 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 NewRelicMonitorResource 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 NewRelicMonitorResource resources by subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown 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 NewRelicMonitorResource 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 NewRelicMonitorResource resources by subscription ID.
+ *
+ * @throws ManagementException thrown 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 NewRelicMonitorResource list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List NewRelicMonitorResource resources by subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown 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 NewRelicMonitorResource 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 NewRelicMonitorResource resources by subscription ID.
+ *
+ * @throws ManagementException thrown 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 NewRelicMonitorResource list operation as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * List NewRelicMonitorResource resources by subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown 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 NewRelicMonitorResource list operation as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * List NewRelicMonitorResource resources 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 NewRelicMonitorResource 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 NewRelicMonitorResource resources 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 NewRelicMonitorResource 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 NewRelicMonitorResource resources 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 NewRelicMonitorResource 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 NewRelicMonitorResource resources 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 NewRelicMonitorResource 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 NewRelicMonitorResource resources 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 NewRelicMonitorResource list operation as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * List NewRelicMonitorResource resources 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 NewRelicMonitorResource 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 a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 NewRelicMonitorResource 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.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ monitorName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 NewRelicMonitorResource 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.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ monitorName,
+ accept,
+ context);
+ }
+
+ /**
+ * Get a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 NewRelicMonitorResource 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 a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 NewRelicMonitorResource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String monitorName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, monitorName, context).block();
+ }
+
+ /**
+ * Get a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 NewRelicMonitorResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NewRelicMonitorResourceInner getByResourceGroup(String resourceGroupName, String monitorName) {
+ return getByResourceGroupWithResponse(resourceGroupName, monitorName, Context.NONE).getValue();
+ }
+
+ /**
+ * Create a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 a Monitor Resource by NewRelic along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String monitorName, NewRelicMonitorResourceInner 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 (monitorName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter monitorName 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
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ monitorName,
+ resource,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 a Monitor Resource by NewRelic along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String monitorName, NewRelicMonitorResourceInner 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 (monitorName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter monitorName 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
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ monitorName,
+ resource,
+ accept,
+ context);
+ }
+
+ /**
+ * Create a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 a Monitor Resource by NewRelic.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, NewRelicMonitorResourceInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, monitorName, resource);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ NewRelicMonitorResourceInner.class,
+ NewRelicMonitorResourceInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Create a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 PollerFlux} for polling of a Monitor Resource by NewRelic.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, NewRelicMonitorResourceInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, monitorName, resource, context);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ NewRelicMonitorResourceInner.class,
+ NewRelicMonitorResourceInner.class,
+ context);
+ }
+
+ /**
+ * Create a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 a Monitor Resource by NewRelic.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, NewRelicMonitorResourceInner> beginCreateOrUpdate(
+ String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource) {
+ return this.beginCreateOrUpdateAsync(resourceGroupName, monitorName, resource).getSyncPoller();
+ }
+
+ /**
+ * Create a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 a Monitor Resource by NewRelic.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, NewRelicMonitorResourceInner> beginCreateOrUpdate(
+ String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource, Context context) {
+ return this.beginCreateOrUpdateAsync(resourceGroupName, monitorName, resource, context).getSyncPoller();
+ }
+
+ /**
+ * Create a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 a Monitor Resource by NewRelic on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource) {
+ return beginCreateOrUpdateAsync(resourceGroupName, monitorName, resource)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 a Monitor Resource by NewRelic on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource, Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, monitorName, resource, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 a Monitor Resource by NewRelic.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NewRelicMonitorResourceInner createOrUpdate(
+ String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource) {
+ return createOrUpdateAsync(resourceGroupName, monitorName, resource).block();
+ }
+
+ /**
+ * Create a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 a Monitor Resource by NewRelic.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NewRelicMonitorResourceInner createOrUpdate(
+ String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource, Context context) {
+ return createOrUpdateAsync(resourceGroupName, monitorName, resource, context).block();
+ }
+
+ /**
+ * Update a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @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 Monitor Resource by NewRelic along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String monitorName, NewRelicMonitorResourceUpdate 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 (monitorName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter monitorName 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,
+ monitorName,
+ properties,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @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 Monitor Resource by NewRelic along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String monitorName, NewRelicMonitorResourceUpdate 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 (monitorName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter monitorName 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,
+ monitorName,
+ properties,
+ accept,
+ context);
+ }
+
+ /**
+ * Update a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @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 Monitor Resource by NewRelic on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String monitorName, NewRelicMonitorResourceUpdate properties) {
+ return updateWithResponseAsync(resourceGroupName, monitorName, properties)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Update a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @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 Monitor Resource by NewRelic along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(
+ String resourceGroupName, String monitorName, NewRelicMonitorResourceUpdate properties, Context context) {
+ return updateWithResponseAsync(resourceGroupName, monitorName, properties, context).block();
+ }
+
+ /**
+ * Update a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @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 Monitor Resource by NewRelic.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NewRelicMonitorResourceInner update(
+ String resourceGroupName, String monitorName, NewRelicMonitorResourceUpdate properties) {
+ return updateWithResponse(resourceGroupName, monitorName, properties, Context.NONE).getValue();
+ }
+
+ /**
+ * Delete a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param userEmail User Email.
+ * @param monitorName Name of the Monitors 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 userEmail, 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 (userEmail == null) {
+ return Mono.error(new IllegalArgumentException("Parameter userEmail 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.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ userEmail,
+ monitorName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param userEmail User Email.
+ * @param monitorName Name of the Monitors 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 userEmail, 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 (userEmail == null) {
+ return Mono.error(new IllegalArgumentException("Parameter userEmail 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.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ userEmail,
+ monitorName,
+ accept,
+ context);
+ }
+
+ /**
+ * Delete a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param userEmail User Email.
+ * @param monitorName Name of the Monitors 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 userEmail, String monitorName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, userEmail, monitorName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Delete a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param userEmail User Email.
+ * @param monitorName Name of the Monitors 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 PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String userEmail, String monitorName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, userEmail, monitorName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Delete a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param userEmail User Email.
+ * @param monitorName Name of the Monitors 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 userEmail, String monitorName) {
+ return this.beginDeleteAsync(resourceGroupName, userEmail, monitorName).getSyncPoller();
+ }
+
+ /**
+ * Delete a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param userEmail User Email.
+ * @param monitorName Name of the Monitors 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 userEmail, String monitorName, Context context) {
+ return this.beginDeleteAsync(resourceGroupName, userEmail, monitorName, context).getSyncPoller();
+ }
+
+ /**
+ * Delete a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param userEmail User Email.
+ * @param monitorName Name of the Monitors 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 userEmail, String monitorName) {
+ return beginDeleteAsync(resourceGroupName, userEmail, monitorName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param userEmail User Email.
+ * @param monitorName Name of the Monitors 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 {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String userEmail, String monitorName, Context context) {
+ return beginDeleteAsync(resourceGroupName, userEmail, monitorName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param userEmail User Email.
+ * @param monitorName Name of the Monitors 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 userEmail, String monitorName) {
+ deleteAsync(resourceGroupName, userEmail, monitorName).block();
+ }
+
+ /**
+ * Delete a NewRelicMonitorResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param userEmail User Email.
+ * @param monitorName Name of the Monitors 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 userEmail, String monitorName, Context context) {
+ deleteAsync(resourceGroupName, userEmail, monitorName, context).block();
+ }
+
+ /**
+ * Get metric rules.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the get metrics status 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 metric rules along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getMetricRulesWithResponseAsync(
+ String resourceGroupName, String monitorName, MetricsRequest request) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.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 (request == null) {
+ return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null."));
+ } else {
+ request.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getMetricRules(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ monitorName,
+ request,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get metric rules.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the get metrics status 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 metric rules along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getMetricRulesWithResponseAsync(
+ String resourceGroupName, String monitorName, MetricsRequest request, 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 (request == null) {
+ return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null."));
+ } else {
+ request.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getMetricRules(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ monitorName,
+ request,
+ accept,
+ context);
+ }
+
+ /**
+ * Get metric rules.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the get metrics status 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 metric rules on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getMetricRulesAsync(
+ String resourceGroupName, String monitorName, MetricsRequest request) {
+ return getMetricRulesWithResponseAsync(resourceGroupName, monitorName, request)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get metric rules.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the get metrics status 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 metric rules along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getMetricRulesWithResponse(
+ String resourceGroupName, String monitorName, MetricsRequest request, Context context) {
+ return getMetricRulesWithResponseAsync(resourceGroupName, monitorName, request, context).block();
+ }
+
+ /**
+ * Get metric rules.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the get metrics status 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 metric rules.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public MetricRulesInner getMetricRules(String resourceGroupName, String monitorName, MetricsRequest request) {
+ return getMetricRulesWithResponse(resourceGroupName, monitorName, request, Context.NONE).getValue();
+ }
+
+ /**
+ * Get metric status.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the get metrics status 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 metric status along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getMetricStatusWithResponseAsync(
+ String resourceGroupName, String monitorName, MetricsStatusRequest request) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.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 (request == null) {
+ return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null."));
+ } else {
+ request.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getMetricStatus(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ monitorName,
+ request,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get metric status.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the get metrics status 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 metric status along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getMetricStatusWithResponseAsync(
+ String resourceGroupName, String monitorName, MetricsStatusRequest request, 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 (request == null) {
+ return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null."));
+ } else {
+ request.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getMetricStatus(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ monitorName,
+ request,
+ accept,
+ context);
+ }
+
+ /**
+ * Get metric status.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the get metrics status 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 metric status on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getMetricStatusAsync(
+ String resourceGroupName, String monitorName, MetricsStatusRequest request) {
+ return getMetricStatusWithResponseAsync(resourceGroupName, monitorName, request)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get metric status.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the get metrics status 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 metric status along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getMetricStatusWithResponse(
+ String resourceGroupName, String monitorName, MetricsStatusRequest request, Context context) {
+ return getMetricStatusWithResponseAsync(resourceGroupName, monitorName, request, context).block();
+ }
+
+ /**
+ * Get metric status.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the get metrics status 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 metric status.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public MetricsStatusResponseInner getMetricStatus(
+ String resourceGroupName, String monitorName, MetricsStatusRequest request) {
+ return getMetricStatusWithResponse(resourceGroupName, monitorName, request, Context.NONE).getValue();
+ }
+
+ /**
+ * List the app service resources currently being monitored by the NewRelic resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the app services get 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 response of a list app services Operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listAppServicesSinglePageAsync(
+ String resourceGroupName, String monitorName, AppServicesGetRequest request) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.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 (request == null) {
+ return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null."));
+ } else {
+ request.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listAppServices(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ monitorName,
+ request,
+ 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 app service resources currently being monitored by the NewRelic resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the app services get 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 response of a list app services Operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listAppServicesSinglePageAsync(
+ String resourceGroupName, String monitorName, AppServicesGetRequest request, 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 (request == null) {
+ return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null."));
+ } else {
+ request.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listAppServices(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ monitorName,
+ request,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List the app service resources currently being monitored by the NewRelic resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the app services get 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 response of a list app services Operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAppServicesAsync(
+ String resourceGroupName, String monitorName, AppServicesGetRequest request) {
+ return new PagedFlux<>(
+ () -> listAppServicesSinglePageAsync(resourceGroupName, monitorName, request),
+ nextLink -> listAppServicesNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List the app service resources currently being monitored by the NewRelic resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the app services get 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 response of a list app services Operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAppServicesAsync(
+ String resourceGroupName, String monitorName, AppServicesGetRequest request, Context context) {
+ return new PagedFlux<>(
+ () -> listAppServicesSinglePageAsync(resourceGroupName, monitorName, request, context),
+ nextLink -> listAppServicesNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List the app service resources currently being monitored by the NewRelic resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the app services get 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 response of a list app services Operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listAppServices(
+ String resourceGroupName, String monitorName, AppServicesGetRequest request) {
+ return new PagedIterable<>(listAppServicesAsync(resourceGroupName, monitorName, request));
+ }
+
+ /**
+ * List the app service resources currently being monitored by the NewRelic resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the app services get 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 response of a list app services Operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listAppServices(
+ String resourceGroupName, String monitorName, AppServicesGetRequest request, Context context) {
+ return new PagedIterable<>(listAppServicesAsync(resourceGroupName, monitorName, request, context));
+ }
+
+ /**
+ * Switches the billing for NewRelic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the switch billing 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> switchBillingWithResponseAsync(
+ String resourceGroupName, String monitorName, SwitchBillingRequest request) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.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 (request == null) {
+ return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null."));
+ } else {
+ request.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .switchBilling(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ monitorName,
+ request,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Switches the billing for NewRelic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the switch billing 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> switchBillingWithResponseAsync(
+ String resourceGroupName, String monitorName, SwitchBillingRequest request, 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 (request == null) {
+ return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null."));
+ } else {
+ request.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .switchBilling(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ monitorName,
+ request,
+ accept,
+ context);
+ }
+
+ /**
+ * Switches the billing for NewRelic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the switch billing 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 switchBillingAsync(String resourceGroupName, String monitorName, SwitchBillingRequest request) {
+ return switchBillingWithResponseAsync(resourceGroupName, monitorName, request).flatMap(ignored -> Mono.empty());
+ }
+
+ /**
+ * Switches the billing for NewRelic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the switch billing 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 switchBillingWithResponse(
+ String resourceGroupName, String monitorName, SwitchBillingRequest request, Context context) {
+ return switchBillingWithResponseAsync(resourceGroupName, monitorName, request, context).block();
+ }
+
+ /**
+ * Switches the billing for NewRelic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the switch billing 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 switchBilling(String resourceGroupName, String monitorName, SwitchBillingRequest request) {
+ switchBillingWithResponse(resourceGroupName, monitorName, request, Context.NONE);
+ }
+
+ /**
+ * List the compute vm resources currently being monitored by the NewRelic resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the Hosts get 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 response of a list VM Host Operation along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listHostsSinglePageAsync(
+ String resourceGroupName, String monitorName, HostsGetRequest request) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.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 (request == null) {
+ return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null."));
+ } else {
+ request.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listHosts(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ monitorName,
+ request,
+ 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 vm resources currently being monitored by the NewRelic resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the Hosts get 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 response of a list VM Host Operation along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listHostsSinglePageAsync(
+ String resourceGroupName, String monitorName, HostsGetRequest request, 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 (request == null) {
+ return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null."));
+ } else {
+ request.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listHosts(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ monitorName,
+ request,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List the compute vm resources currently being monitored by the NewRelic resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the Hosts get 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 response of a list VM Host Operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listHostsAsync(
+ String resourceGroupName, String monitorName, HostsGetRequest request) {
+ return new PagedFlux<>(
+ () -> listHostsSinglePageAsync(resourceGroupName, monitorName, request),
+ nextLink -> listHostsNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List the compute vm resources currently being monitored by the NewRelic resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the Hosts get 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 response of a list VM Host Operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listHostsAsync(
+ String resourceGroupName, String monitorName, HostsGetRequest request, Context context) {
+ return new PagedFlux<>(
+ () -> listHostsSinglePageAsync(resourceGroupName, monitorName, request, context),
+ nextLink -> listHostsNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List the compute vm resources currently being monitored by the NewRelic resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the Hosts get 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 response of a list VM Host Operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listHosts(String resourceGroupName, String monitorName, HostsGetRequest request) {
+ return new PagedIterable<>(listHostsAsync(resourceGroupName, monitorName, request));
+ }
+
+ /**
+ * List the compute vm resources currently being monitored by the NewRelic resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors resource.
+ * @param request The details of the Hosts get 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 response of a list VM Host Operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listHosts(
+ String resourceGroupName, String monitorName, HostsGetRequest request, Context context) {
+ return new PagedIterable<>(listHostsAsync(resourceGroupName, monitorName, request, context));
+ }
+
+ /**
+ * List the resources currently being monitored by the NewRelic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 list of all the resources being monitored by NewRelic monitor resource 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.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ monitorName,
+ 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 NewRelic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 list of all the resources being monitored by NewRelic monitor resource 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.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ monitorName,
+ 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 NewRelic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 list of all the resources being monitored by NewRelic monitor resource 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 NewRelic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 list of all the resources being monitored by NewRelic monitor resource 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 NewRelic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 list of all the resources being monitored by NewRelic monitor resource 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 NewRelic monitor resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 list of all the resources being monitored by NewRelic monitor resource 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));
+ }
+
+ /**
+ * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 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.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ monitorName,
+ 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 NewRelic agent on a VM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 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.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ monitorName,
+ accept,
+ context);
+ }
+
+ /**
+ * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param monitorName Name of the Monitors 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 response of payload to be passed while installing VM agent on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono